- Type Parameters:
T- the chunk type
- All Superinterfaces:
AutoCloseable,BufferedEncodedOutput,Output<RuntimeException>,Output.CloseableEncodedOutput<RuntimeException>,Output.EncodedOutput<RuntimeException>
Maintains the encoded output in an iterable of chunks of type
T that is
optimized for BufferedEncodedOutput.asReadableByteChannel().- Author:
- agentgt
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jstach.jstachio.Output
Output.CloseableEncodedOutput<E extends Exception>, Output.EncodedOutput<E extends Exception>, Output.StringOutput -
Method Summary
Modifier and TypeMethodDescriptionintFor chunk output the buffer hint is usually the size of the largest chunk.Gets the internal sequence of chunks.static ChunkEncodedOutput<byte[]>ofByteArrays(Charset charset) A chunk encoded output backed by a list of byte arraysMethods inherited from interface io.jstach.jstachio.output.BufferedEncodedOutput
accept, append, append, asReadableByteChannel, close, isReusable, limit, size, toByteArray, transferTo
-
Method Details
-
getChunks
Gets the internal sequence of chunks.- Returns:
- sequence of chunks
-
ofByteArrays
A chunk encoded output backed by a list of byte arrays- Parameters:
charset- the expected charset- Returns:
- encoded output ready to be written to.
-
bufferSizeHint
int bufferSizeHint()For chunk output the buffer hint is usually the size of the largest chunk. The recommend buffer size to use for extracting withBufferedEncodedOutput.asReadableByteChannel()orBufferedEncodedOutput.transferTo(OutputStream).- Specified by:
bufferSizeHintin interfaceBufferedEncodedOutput- Returns:
- buffer size to use which by default is
BufferedEncodedOutput.size().
-