org.crosswire.common.compress
Class Gzip
java.lang.Object
org.crosswire.common.compress.AbstractCompressor
org.crosswire.common.compress.Gzip
- All Implemented Interfaces:
- Compressor
public class Gzip
- extends AbstractCompressor
GZip manages the compression and uncompression of GZip data.
- Author:
- DM Smith
- See Also:
The GNU Lesser General Public License for details.
Constructor Summary |
Gzip(InputStream input)
Create a GZip that is capable of transforming the input. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Gzip
public Gzip(InputStream input)
- Create a GZip that is capable of transforming the input.
- Parameters:
input
- to compress or uncompress.
compress
public ByteArrayOutputStream compress()
throws IOException
- Description copied from interface:
Compressor
- Compresses the input and provides the result.
- Returns:
- the compressed result
- Throws:
IOException
- if an exception is encountered
uncompress
public ByteArrayOutputStream uncompress()
throws IOException
- Description copied from interface:
Compressor
- Uncompresses the input and provides the result.
- Returns:
- the uncompressed result
- Throws:
IOException
- if an exception is encountered
uncompress
public ByteArrayOutputStream uncompress(int expectedLength)
throws IOException
- Description copied from interface:
Compressor
- Uncompresses the input and provides the result.
- Parameters:
expectedLength
- the size of the result buffer
- Returns:
- the uncompressed result
- Throws:
IOException
- if an exception is encountered