Class ChunkInputStreamOptionalBuffer

java.lang.Object
java.io.InputStream
io.clonecloudstore.common.quarkus.stream.ChunkInputStreamOptionalBuffer
All Implemented Interfaces:
ChunkInputStreamInterface, Closeable, AutoCloseable

public class ChunkInputStreamOptionalBuffer extends InputStream implements ChunkInputStreamInterface
Transform one InputStream to Multiple InputStream, each one being a chunk of the primary one.

Note that if length is not provided, chunk size will be the buffer size used internally, so the buffer size will be reduced to 512 MB for memory capacity handling. Inversely, if length is provided, no buffer will be allocated.