ByteWriteChannel
Channel for asynchronous writing of sequences of bytes. This is a single-writer channel.
Operations on this channel cannot be invoked concurrently, unless explicitly specified otherwise in description. Exceptions are close and flush.
Channel for asynchronous writing of sequences of bytes. This is a single-writer channel.
Operations on this channel cannot be invoked concurrently, unless explicitly specified otherwise in description. Exceptions are close and flush.
Functions
Invokes block when at least 1 byte is available for write.
Flushes all pending write bytes making them available for read.
Flushes all pending write bytes making them available for read.
Flushes all pending write bytes making them available for read.
Invokes block when it will be possible to write at least min bytes providing byte buffer to it so lambda can write to the buffer up to ByteBuffer.remaining bytes. If there are no min bytes spaces available then the invocation could suspend until the requirement will be met.
Writes as much as possible and only suspends if buffer is full
Invokes block if it is possible to write at least min byte providing byte buffer to it so lambda can write to the buffer up to ByteBuffer.remaining bytes. If there are no min bytes spaces available then the invocation returns 0.
Writes as much as possible and only suspends if buffer is full
Writes as much as possible and only suspends if buffer is full
Writes byte and suspends until written. Crashes if channel get closed while writing.
Writes byte and suspends until written. Crashes if channel get closed while writing.
Writes double number and suspends until written. Crashes if channel get closed while writing.
Writes double number and suspends until written. Crashes if channel get closed while writing.
Writes double number and suspends until written. Crashes if channel get closed while writing.
Writes float number and suspends until written. Crashes if channel get closed while writing.
Writes float number and suspends until written. Crashes if channel get closed while writing.
Writes float number and suspends until written. Crashes if channel get closed while writing.
Writes int number and suspends until written. Crashes if channel get closed while writing.
Writes int number and suspends until written. Crashes if channel get closed while writing.
Writes long number and suspends until written. Crashes if channel get closed while writing.
Writes long number and suspends until written. Crashes if channel get closed while writing.
Writes short number and suspends until written. Crashes if channel get closed while writing.
Writes short number and suspends until written. Crashes if channel get closed while writing.
Writes short number and suspends until written. Crashes if channel get closed while writing.
Invokes block for every free buffer until it return false
. It will also suspend every time when no free space available for write.
Properties
Returns true
if channel flushes automatically all pending bytes after every write function call. If false
then flush only happens at manual flush invocation or when the buffer is full.
Returns true
if channel flushes automatically all pending bytes after every write function call. If false
then flush only happens at manual flush invocation or when the buffer is full.
Byte order that is used for multi-byte write operations (such as writeShort, writeInt, writeLong, writeFloat, and writeDouble).
Byte order that is used for multi-byte write operations (such as writeShort, writeInt, writeLong, writeFloat, and writeDouble).
Byte order that is used for multi-byte write operations (such as writeShort, writeInt, writeLong, writeFloat, and writeDouble).
Inheritors
Extensions
Closes this channel with no failure (successfully)
Create blocking java.io.OutputStream for this channel that does block every time the channel suspends at write Similar to do reading in runBlocking however you can pass it to regular blocking API
Await for desiredSpace will be available for write and invoke block function providing Memory instance and the corresponding range suitable for wiring in the memory. The block function should return number of bytes were written, possibly 0.
Writes UTF16 character