Package com.github.luben.zstd
Class ZstdDirectBufferDecompressingStreamNoFinalizer
- java.lang.Object
-
- com.github.luben.zstd.ZstdDirectBufferDecompressingStreamNoFinalizer
-
- All Implemented Interfaces:
java.io.Closeable
public class ZstdDirectBufferDecompressingStreamNoFinalizer extends java.lang.Object implements java.io.Closeable
-
-
Constructor Summary
Constructors Constructor Description ZstdDirectBufferDecompressingStreamNoFinalizer(java.nio.ByteBuffer source)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanhasRemaining()intread(java.nio.ByteBuffer target)static intrecommendedTargetBufferSize()protected java.nio.ByteBufferrefill(java.nio.ByteBuffer toRefill)Override this method in case the byte buffer passed to the constructor might not contain the full compressed streamZstdDirectBufferDecompressingStreamNoFinalizersetDict(byte[] dict)ZstdDirectBufferDecompressingStreamNoFinalizersetDict(ZstdDictDecompress dict)ZstdDirectBufferDecompressingStreamNoFinalizersetLongMax(int windowLogMax)
-
-
-
Method Detail
-
refill
protected java.nio.ByteBuffer refill(java.nio.ByteBuffer toRefill)
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.
-
hasRemaining
public boolean hasRemaining()
-
recommendedTargetBufferSize
public static int recommendedTargetBufferSize()
-
setDict
public ZstdDirectBufferDecompressingStreamNoFinalizer setDict(byte[] dict) throws java.io.IOException
- Throws:
java.io.IOException
-
setDict
public ZstdDirectBufferDecompressingStreamNoFinalizer setDict(ZstdDictDecompress dict) throws java.io.IOException
- Throws:
java.io.IOException
-
setLongMax
public ZstdDirectBufferDecompressingStreamNoFinalizer setLongMax(int windowLogMax) throws java.io.IOException
- Throws:
java.io.IOException
-
read
public int read(java.nio.ByteBuffer target) throws java.io.IOException- Throws:
java.io.IOException
-
close
public void close()
- Specified by:
closein interfacejava.io.Closeable
-
-