interface StreamableBuffer
A buffer that can be read little by little.
Since
7
Async |
interface Async |
async |
abstract fun async(): Async! |
getSize |
Exposes the property size value abstract fun getSize(): Long! |
read |
Read a chunk of the buffer. Reading past end is safe, and produce no data as a result. abstract fun read(offset: Long!, nofBytes: Long!): ByteBuffer! |
copyToStream |
Copy a StreamableBuffer to an OutputStream, chunk by chunk. fun StreamableBuffer.copyToStream(outputStream: OutputStream, chunkSize: Long = DEFAULT_CHUNK_SIZE): Unit |
readAll |
Read a StreamableBuffer entirely, chunk by chunk. fun StreamableBuffer.readAll(chunkSize: Long = DEFAULT_CHUNK_SIZE): ByteBuffer fun StreamableBuffer.readAll(chunkSize: Long = DEFAULT_CHUNK_SIZE, onReadChunkFunction: (chunkBuffer: ByteBuffer) -> Unit): Unit fun StreamableBuffer.readAll(chunkSize: Long = DEFAULT_CHUNK_SIZE, onReadChunkConsumer: Consumer<ByteBuffer>): Unit |