Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

A class can be Activatable if it needs a significant amount of memory on an irregular basis, and so would benefit from being told when to wake-up and when to conserver memory.

Author:
  DM Smith [dmsmith555 at yahoo dot com]
See Also:
  `for license details.
  The copyright to this program is held by it's authors.`

Field Summary

Fields inherited from class org.crosswire.common.compress.AbstractCompressor
`input`

Fields inherited from interface org.crosswire.common.compress.Compressor
`BUF_SIZE`

Constructor Summary
`Zip(InputStream input)` Create a Zip that is capable of transforming the input.

Method Summary
`ByteArrayOutputStream` | `compress()` Compresses the input and provides the result.
`ByteArrayOutputStream` | `uncompress()` Uncompresses the input and provides the result.
`ByteArrayOutputStream` | `uncompress(int expectedLength)` Uncompresses the input and provides the result.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Zip

    public Zip(InputStream input)

  Create a Zip that is capable of transforming the input.

  Parameters:
    `input` - to compress or uncompress.

Method Detail

### compress

    public ByteArrayOutputStream compress()
                                   throws IOException

  Description copied from interface: `Compressor`
  Compresses the input and provides the result.

  Returns:
    the compressed result
  Throws:
    `IOException`

### uncompress

    public ByteArrayOutputStream uncompress()
                                     throws IOException

  Description copied from interface: `Compressor`
  Uncompresses the input and provides the result.

  Returns:
    the uncompressed result
  Throws:
    `IOException`

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¨ 2003-2007
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD