Package com.github.luben.zstd
Class ZstdDirectBufferDecompressingStream
java.lang.Object
com.github.luben.zstd.ZstdDirectBufferDecompressingStream
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voidfinalize()booleanintread(ByteBuffer target) static intprotected ByteBufferrefill(ByteBuffer toRefill) Override this method in case the byte buffer passed to the constructor might not contain the full compressed streamsetDict(byte[] dict) setDict(ZstdDictDecompress dict) voidsetFinalize(boolean finalize) Enable or disable class finalizers If finalizers are disabled the responsibility fir calling the `close` method is on the consumer.setLongMax(int windowLogMax)
-
Constructor Details
-
ZstdDirectBufferDecompressingStream
-
-
Method Details
-
refill
Override this method in case the byte buffer passed to the constructor might not contain the full compressed stream- Parameters:
toRefill- current buffer- Returns:
- either the current buffer (but refilled and flipped if there was new content) or a new buffer.
-
setFinalize
public void setFinalize(boolean finalize) Enable or disable class finalizers If finalizers are disabled the responsibility fir calling the `close` method is on the consumer.- Parameters:
finalize- default `true` - finalizers are enabled
-
hasRemaining
public boolean hasRemaining() -
recommendedTargetBufferSize
public static int recommendedTargetBufferSize() -
setDict
- Throws:
IOException
-
setDict
- Throws:
IOException
-
setLongMax
- Throws:
IOException
-
read
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
finalize
-