Package io.activej.csp.file
Class ChannelFileWriter
java.lang.Object
io.activej.reactor.AbstractReactive
io.activej.reactor.ImplicitlyReactive
io.activej.async.process.AbstractAsyncCloseable
io.activej.csp.consumer.AbstractChannelConsumer<io.activej.bytebuf.ByteBuf>
io.activej.csp.file.ChannelFileWriter
- All Implemented Interfaces:
io.activej.async.process.AsyncCloseable,ChannelConsumer<io.activej.bytebuf.ByteBuf>,io.activej.reactor.Reactive
This consumer allows you to asynchronously write binary data to a file.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class io.activej.reactor.AbstractReactive
reactorFields inherited from interface io.activej.async.process.AsyncCloseable
STATIC -
Method Summary
Modifier and TypeMethodDescriptionstatic ChannelFileWriter.Builderbuilder(io.activej.async.file.IFileService fileService, FileChannel channel) static ChannelFileWriter.Builderbuilder(io.activej.reactor.Reactor reactor, Executor executor, FileChannel channel) static ChannelFileWriter.BuilderbuilderBlocking(io.activej.reactor.Reactor reactor, Executor executor, Path path, OpenOption... openOptions) static io.activej.promise.Promise<ChannelFileWriter.Builder>builderOpen(Executor executor, Path path) static io.activej.promise.Promise<ChannelFileWriter.Builder>builderOpen(Executor executor, Path path, OpenOption... openOptions) static ChannelFileWritercreate(io.activej.async.file.IFileService fileService, FileChannel channel) static ChannelFileWritercreate(io.activej.reactor.Reactor reactor, Executor executor, FileChannel channel) protected io.activej.promise.Promise<Void>doAccept(io.activej.bytebuf.ByteBuf buf) longprotected voidstatic io.activej.promise.Promise<ChannelFileWriter>static io.activej.promise.Promise<ChannelFileWriter>open(Executor executor, Path path, OpenOption... openOptions) static ChannelFileWriteropenBlocking(io.activej.reactor.Reactor reactor, Executor executor, Path path) static ChannelFileWriteropenBlocking(io.activej.reactor.Reactor reactor, Executor executor, Path path, OpenOption... openOptions) toString()Methods inherited from class io.activej.csp.consumer.AbstractChannelConsumer
acceptMethods inherited from class io.activej.async.process.AbstractAsyncCloseable
closeEx, doSanitize, getCloseable, getException, isClosed, onCleanup, sanitize, setCloseableMethods inherited from class io.activej.reactor.AbstractReactive
getReactorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.activej.async.process.AsyncCloseable
close, closeExMethods inherited from interface io.activej.csp.consumer.ChannelConsumer
acceptAll, acceptAll, acceptAll, acceptEndOfStream, async, filter, map, mapAsync, peek, transformWith, withAcknowledgement, withExecutor
-
Method Details
-
create
public static ChannelFileWriter create(io.activej.reactor.Reactor reactor, Executor executor, FileChannel channel) -
create
public static ChannelFileWriter create(io.activej.async.file.IFileService fileService, FileChannel channel) -
open
-
open
public static io.activej.promise.Promise<ChannelFileWriter> open(Executor executor, Path path, OpenOption... openOptions) -
openBlocking
public static ChannelFileWriter openBlocking(io.activej.reactor.Reactor reactor, Executor executor, Path path) throws IOException - Throws:
IOException
-
openBlocking
public static ChannelFileWriter openBlocking(io.activej.reactor.Reactor reactor, Executor executor, Path path, OpenOption... openOptions) throws IOException - Throws:
IOException
-
builder
public static ChannelFileWriter.Builder builder(io.activej.reactor.Reactor reactor, Executor executor, FileChannel channel) -
builder
public static ChannelFileWriter.Builder builder(io.activej.async.file.IFileService fileService, FileChannel channel) -
builderOpen
public static io.activej.promise.Promise<ChannelFileWriter.Builder> builderOpen(Executor executor, Path path) -
builderOpen
public static io.activej.promise.Promise<ChannelFileWriter.Builder> builderOpen(Executor executor, Path path, OpenOption... openOptions) -
builderBlocking
public static ChannelFileWriter.Builder builderBlocking(io.activej.reactor.Reactor reactor, Executor executor, Path path, OpenOption... openOptions) throws IOException - Throws:
IOException
-
getPosition
public long getPosition() -
onClosed
- Overrides:
onClosedin classio.activej.async.process.AbstractAsyncCloseable
-
doAccept
- Specified by:
doAcceptin classAbstractChannelConsumer<io.activej.bytebuf.ByteBuf>
-
toString
-