public class ZstdInputStream
extends java.io.FilterInputStream
| Constructor and Description |
|---|
ZstdInputStream(java.io.InputStream inStream)
create a new decompressing InputStream
|
ZstdInputStream(java.io.InputStream inStream,
BufferPool bufferPool)
create a new decompressing InputStream
|
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
protected void |
finalize() |
boolean |
getContinuous() |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] dst,
int offset,
int len) |
ZstdInputStream |
setContinuous(boolean b)
Don't break on unfinished frames
Use case: decompressing files that are not
yet finished writing and compressing
|
ZstdInputStream |
setDict(byte[] dict) |
ZstdInputStream |
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.
|
long |
skip(long numBytes) |
public ZstdInputStream(java.io.InputStream inStream)
throws java.io.IOException
inStream - the stream to wrapjava.io.IOExceptionpublic ZstdInputStream(java.io.InputStream inStream,
BufferPool bufferPool)
throws java.io.IOException
inStream - the stream to wrapbufferPool - the pool to fetch and return buffersjava.io.IOExceptionpublic ZstdInputStream setContinuous(boolean b)
public boolean getContinuous()
public void setFinalize(boolean finalize)
finalize - default `true` - finalizers are enabledpublic ZstdInputStream setDict(byte[] dict) throws java.io.IOException
java.io.IOExceptionpublic ZstdInputStream setDict(ZstdDictDecompress dict) throws java.io.IOException
java.io.IOExceptionpublic int read(byte[] dst,
int offset,
int len)
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic int read()
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic int available()
throws java.io.IOException
available in class java.io.FilterInputStreamjava.io.IOExceptionpublic boolean markSupported()
markSupported in class java.io.FilterInputStreampublic long skip(long numBytes)
throws java.io.IOException
skip in class java.io.FilterInputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.FilterInputStreamjava.io.IOExceptionprotected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable