public class ZCompressorInputStream
extends java.io.FilterInputStream
InputStream
that will expand data from
an enclosed InputStream containing data that was compressed
by the same z/Architecture compression dictionaries. Not thread safe.ZCompressor
Constructor and Description |
---|
ZCompressorInputStream(ZCompressor compressor,
java.io.InputStream in)
Create a new input stream with default buffer size.
|
ZCompressorInputStream(ZCompressor compressor,
java.io.InputStream in,
int buflen)
Create a new input stream with the specified buffer size.
|
Modifier and Type | Method and Description |
---|---|
int |
available()
Returns an estimate of the number of bytes that can be read.
|
void |
close() |
long |
getTotalExpandedBytes()
Answer the total number of bytes expanded so far.
|
long |
getTotalSourceBytes()
Answer the total number of compressed bytes read so far.
|
void |
mark(int limit)
Does nothing, not supported.
|
boolean |
markSupported()
Always returns false, mark/reset is not supported.
|
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] readBuf,
int readBufOff,
int readBufLen) |
void |
releaseZCompressorOnClose(boolean value)
Sets a flag that will cause the ZCompressor resources to be released
when this OutputStream is closed.
|
void |
reset()
This method is not supported and always throws an IOException.
|
long |
skip(long n)
This method is not supported and always throws an IOException.
|
public ZCompressorInputStream(ZCompressor compressor, java.io.InputStream in)
compressor
- the ZCompressor object used to expand datain
- the InputStream containing compressed datapublic ZCompressorInputStream(ZCompressor compressor, java.io.InputStream in, int buflen)
compressor
- the ZCompressor object used to expand datain
- the InputStream containing compressed databuflen
- the length of internal compression and expansion bufferspublic void releaseZCompressorOnClose(boolean value)
false
.public long getTotalSourceBytes()
public long getTotalExpandedBytes()
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.FilterInputStream
java.io.IOException
InputStream.close()
public int read() throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
InputStream.read()
public int read(byte[] b) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
InputStream.read(byte[])
public int read(byte[] readBuf, int readBufOff, int readBufLen) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
InputStream.read(byte[], int, int)
public long skip(long n) throws java.io.IOException
skip
in class java.io.FilterInputStream
java.io.IOException
- always throws IOException since skip() is not supportedInputStream.skip(long)
public int available() throws java.io.IOException
available
in class java.io.FilterInputStream
java.io.IOException
InputStream.available()
public boolean markSupported()
markSupported
in class java.io.FilterInputStream
InputStream.markSupported()
public void mark(int limit)
mark
in class java.io.FilterInputStream
InputStream.mark(int)
public void reset() throws java.io.IOException
reset
in class java.io.FilterInputStream
java.io.IOException
- since mark/reset is not supportedInputStream.reset()