org.crosswire.common.compress
Class Zip
java.lang.Object
org.crosswire.common.compress.AbstractCompressor
org.crosswire.common.compress.Zip
- All Implemented Interfaces:
- Compressor
public class Zip
- extends AbstractCompressor
Zip manages the compression and uncompression of Zip files.
- Author:
- DM Smith
- See Also:
The GNU Lesser General Public License for details.
Constructor Summary |
Zip(InputStream input)
Create a Zip 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 |
Zip
public Zip(InputStream input)
- Create a Zip 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