|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.io.InputStream
|
+--net.rim.device.api.compress.ZLibInputStream
Input stream for reading a data stream compressed with the ZLib algorithm (RFC 1950, RFC 1951).
| Constructor Summary | ||
ZLibInputStream(InputStream inputStream)
Creates a new ZLibInputStream instance (which requires the ZLib header and trailer wrapping to be present - see other constructor). |
||
ZLibInputStream(InputStream inputStream,
boolean noWrap)
Creates a new ZLibInputStream instance. |
||
| Method Summary | ||
int |
available()
Retreives number of bytes which can be read from this stream without blocking. |
|
void |
close()
Closes this stream. |
|
int |
read()
Retrieves one byte from this input stream. |
|
int |
read(byte[] buffer)
Reads some bytes from this stream. |
|
int |
read(byte[] buffer,
int bufferOffset,
int bufferLength)
Read specified number of bytes from this stream. |
|
| Methods inherited from class java.io.InputStream |
mark, markSupported, reset, skip |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ZLibInputStream(InputStream inputStream)
inputStream - Underlying input stream to use.public ZLibInputStream(InputStream inputStream, boolean noWrap)
If noWrap is true, the decompressor will assume that the
ZLib 16 bit header and the 32 bit trailer checksum are not included in the
underlying input stream. This mode is necessary for PKZip/Info-ZIP and GZIP
compatibility.
inputStream - Underlying input stream to use.noWrap - If true, the header and trailer are not present in the underlying input stream.| Method Detail |
public int read()
throws IOException
read in class InputStreamIOException - If an I/O error occurs.
public int read(byte[] buffer)
throws IOException
Invoke this method to attempt to fill a provided output parameter byte array with data from this stream.
read in class InputStreambuffer - Buffer to contain read and decompressed data.IOException - If an I/O error occurs.
public int read(byte[] buffer,
int bufferOffset,
int bufferLength)
throws IOException
read in class InputStreambuffer - Buffer to contain data; must be large enough to contain
desired number of bytes.bufferOffset - First element in output parameter buffer at which to
begin writing decoded data; if not 0, then output parameter buffer must
be at least bufferOffset + bufferLength elements long.bufferLength - Number of bytes to read from this stream.IOException - If an I/O error occurs.
public int available()
throws IOException
available in class InputStreamIOException - If an I/O error occurs.
public void close()
throws IOException
close in class InputStreamIOException - If an I/O error occurs.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2002 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.