Package com.github.luben.zstd
Class ZstdDirectBufferDecompressingStream
java.lang.Object
com.github.luben.zstd.ZstdDirectBufferDecompressingStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected void
finalize()
boolean
int
read
(ByteBuffer target) static int
protected ByteBuffer
refill
(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) void
setFinalize
(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)
-
Field Details
-
inner
-
finalize
private boolean finalize
-
-
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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
finalize
-