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.apache.poi.openxml4j.util
Class ZipInputStreamZipEntrySource

    java.lang.Object
      org.apache.poi.openxml4j.util.ZipInputStreamZipEntrySource

All Implemented Interfaces:
  ZipEntrySource

    public class ZipInputStreamZipEntrySource

extends java.lang.Object
implements ZipEntrySource

Provides a way to get at all the ZipEntries from a ZipInputStream, as many times as required. Allows a ZipInputStream to be treated much like a ZipFile, for a price in terms of memory. Be sure to call `close()` as soon as you're done, to free up that memory!

Nested Class Summary
`static class` | `ZipInputStreamZipEntrySource.FakeZipEntry` So we can close the real zip entry and still effectively work with it.

Constructor Summary
`ZipInputStreamZipEntrySource(java.util.zip.ZipInputStream inp)` Reads all the entries from the ZipInputStream into memory, and closes the source stream.

Method Summary
`void` | `close()` Indicates we are done with reading, and resources may be freed
`java.util.Enumeration` | `getEntries()` Returns an Enumeration of all the Entries
`java.io.InputStream` | `getInputStream(java.util.zip.ZipEntry zipEntry)` Returns an InputStream of the decompressed data that makes up the entry

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

Constructor Detail

### ZipInputStreamZipEntrySource

    public ZipInputStreamZipEntrySource(java.util.zip.ZipInputStream inp)
                                 throws java.io.IOException

  Reads all the entries from the ZipInputStream into memory, and closes the source stream. We'll then eat lots of memory, but be able to work with the entries at-will.

  Throws:
    `java.io.IOException`

Method Detail

### getEntries

    public java.util.Enumeration getEntries()

  Description copied from interface: `ZipEntrySource`
  Returns an Enumeration of all the Entries

  Specified by:
    `getEntries` in interface `ZipEntrySource`

### getInputStream

    public java.io.InputStream getInputStream(java.util.zip.ZipEntry zipEntry)

  Description copied from interface: `ZipEntrySource`
  Returns an InputStream of the decompressed data that makes up the entry

  Specified by:
    `getInputStream` in interface `ZipEntrySource`

### close

    public void close()

  Description copied from interface: `ZipEntrySource`
  Indicates we are done with reading, and resources may be freed

  Specified by:
    `close` in interface `ZipEntrySource`

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