类 CompletableFileWriter
- java.lang.Object
-
- io.github.kavahub.file.writer.CompletableFileWriter
-
- 所有已实现的接口:
AutoCloseable
public class CompletableFileWriter extends Object implements AutoCloseable
-
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 voidclose()CompletableFuture<Integer>getPosition()static CompletableFileWriterof(Path file, StandardOpenOption... options)CompletableFuture<Integer>write(byte[] bytes)CompletableFuture<Integer>write(String str)CompletableFuture<Integer>write(ByteBuffer data)protected CompletableFuture<Integer>write(ByteBuffer data, int position)
-
-
-
方法详细资料
-
of
public static CompletableFileWriter of(Path file, StandardOpenOption... options) throws IOException
- 抛出:
IOException
-
getPosition
public CompletableFuture<Integer> getPosition()
-
write
public CompletableFuture<Integer> write(String str)
-
write
public CompletableFuture<Integer> write(byte[] bytes)
-
write
public CompletableFuture<Integer> write(ByteBuffer data)
-
write
protected CompletableFuture<Integer> write(ByteBuffer data, int position)
-
close
public void close() throws Exception- 指定者:
close在接口中AutoCloseable- 抛出:
Exception
-
-