ewe.zip
Class InflaterInputStream
java.lang.Object
ewe.util.Errorable
ewe.io.BasicStreamObject
ewe.io.StreamObject
ewe.zip.InflaterInputStream
- All Implemented Interfaces:
- BasicStream, Stream, Streamable
- public class InflaterInputStream
- extends StreamObject
| Methods inherited from class ewe.io.StreamObject |
close, doRead, doWrite, flush, isOpen, nap, nap, nonBlockingWrite, read, readAByte, readBytes, readBytes, write, writeAByte, writeBytes, writeBytes |
reserved
protected Object reserved
- Don't use this. It is a placeholder for a native resource.
byteIn
protected ByteArray byteIn
byteOut
protected ByteArray byteOut
input
protected BasicStream input
Z_OK
protected static final int Z_OK
- See Also:
- Constant Field Values
Z_STREAM_END
protected static final int Z_STREAM_END
- See Also:
- Constant Field Values
Z_NEED_DICT
protected static final int Z_NEED_DICT
- See Also:
- Constant Field Values
Z_ERRNO
protected static final int Z_ERRNO
- See Also:
- Constant Field Values
Z_STREAM_ERROR
protected static final int Z_STREAM_ERROR
- See Also:
- Constant Field Values
Z_DATA_ERROR
protected static final int Z_DATA_ERROR
- See Also:
- Constant Field Values
Z_MEM_ERROR
protected static final int Z_MEM_ERROR
- See Also:
- Constant Field Values
Z_BUF_ERROR
protected static final int Z_BUF_ERROR
- See Also:
- Constant Field Values
Z_VERSION_ERROR
protected static final int Z_VERSION_ERROR
- See Also:
- Constant Field Values
InflaterInputStream
public InflaterInputStream(BasicStream input)
InflaterInputStream
public InflaterInputStream(BasicStream input,
boolean noWrap)
InflaterInputStream
public InflaterInputStream(InputStream input,
boolean noWrap)
InflaterInputStream
public InflaterInputStream(InputStream input)
setBufferSize
public void setBufferSize(int size)
- Don't call this after starting to read input!
inflateInit
protected int inflateInit(boolean noWrap)
inflate
protected int inflate(ByteArray in,
ByteArray out)
inflateEnd
protected int inflateEnd()
nonBlockingRead
public int nonBlockingRead(byte[] buff,
int start,
int count)
- Description copied from class:
StreamObject
- This is the non-blocking read operation. It should never attempt to
wait() or sleep() in a Coroutine. It should return as quickly as possible.
This makes it safe to be called from within a native method.
Note that this should NEVER be called with a count of zero.
The default StreamObject implementation of this uses the single byte read() method.
- Specified by:
nonBlockingRead in interface BasicStream- Overrides:
nonBlockingRead in class StreamObject
- Parameters:
buff - Destination byte array to hold incoming data.start - Starting index in buff for incoming data.count - Maximum number of bytes to read - should never be zero.
- Returns:
- greater than 0 = Number of bytes read.
0 = No bytes available to read at this time.
-1 = Stream end reached no further bytes to read.
-2 = IO Error.
Note that these values are different to the Stream.readBytes method.
closeStream
public boolean closeStream()
throws IOException
- Description copied from interface:
BasicStream
- This is non-blocking. It returns true if the close completed, false if it did not,
or throws an exception on error.
- Specified by:
closeStream in interface BasicStream- Overrides:
closeStream in class StreamObject
- Throws:
IOException
flushStream
public boolean flushStream()
throws IOException
- Description copied from interface:
BasicStream
- This is non-blocking. It returns true if the flush completed, false if it did not,
or throws an exception on error.
- Throws:
IOException