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.openjpa.lib.meta
Class ZipFileMetaDataIterator

    java.lang.Object
      org.apache.openjpa.lib.meta.ZipFileMetaDataIterator

All Implemented Interfaces:
  MetaDataFilter.Resource, MetaDataIterator, Closeable

    public class ZipFileMetaDataIterator

extends Object
implements MetaDataIterator, MetaDataFilter.Resource

Iterator over all metadata resources in a given zip file.

Author:
  Abe White

Constructor Summary
`ZipFileMetaDataIterator(URL url, MetaDataFilter filter)` Constructor; supply zip/jar URL and optional file filter.
`ZipFileMetaDataIterator(ZipFile file, MetaDataFilter filter)` Constructor; supply zip file and optional file filter.

Method Summary
`void` | `close()` Close the resources used by this iterator.
`byte[]` | `getContent()` Resource content.
`File` | `getFile()` Return the last-iterated metadata resource content as a file, or null if not an extant file.
`InputStream` | `getInputStream()` Return the last-iterated metadata resource content as a stream.
`String` | `getName()` The name of the resource.
`boolean` | `hasNext()` Return whether there is another resource to iterate over.
`String` | `next()` Return the next metadata resource.

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

Constructor Detail

### ZipFileMetaDataIterator

    public ZipFileMetaDataIterator(URL url,
                                   MetaDataFilter filter)
                            throws IOException

  Constructor; supply zip/jar URL and optional file filter.

  Throws:
    `IOException`

### ZipFileMetaDataIterator

    public ZipFileMetaDataIterator(ZipFile file,
                                   MetaDataFilter filter)

  Constructor; supply zip file and optional file filter.

Method Detail

### hasNext

    public boolean hasNext()
                    throws IOException

  Description copied from interface: `MetaDataIterator`
  Return whether there is another resource to iterate over.

  Specified by:
    `hasNext` in interface `MetaDataIterator`
  Throws:
    `IOException`

### next

    public String next()
                throws IOException

  Description copied from interface: `MetaDataIterator`
  Return the next metadata resource.

  Specified by:
    `next` in interface `MetaDataIterator`
  Throws:
    `IOException`

### getInputStream

    public InputStream getInputStream()
                               throws IOException

  Description copied from interface: `MetaDataIterator`
  Return the last-iterated metadata resource content as a stream.

  Specified by:
    `getInputStream` in interface `MetaDataIterator`
  Throws:
    `IOException`

### getFile

    public File getFile()

  Description copied from interface: `MetaDataIterator`
  Return the last-iterated metadata resource content as a file, or null if not an extant file.

  Specified by:
    `getFile` in interface `MetaDataIterator`

### close

    public void close()

  Description copied from interface: `MetaDataIterator`
  Close the resources used by this iterator.

  Specified by:
    `close` in interface `MetaDataIterator`
  Specified by:
    `close` in interface `Closeable`

### getName

    public String getName()

  Description copied from interface: `MetaDataFilter.Resource`
  The name of the resource.

  Specified by:
    `getName` in interface `MetaDataFilter.Resource`

### getContent

    public byte[] getContent()
                      throws IOException

  Description copied from interface: `MetaDataFilter.Resource`
  Resource content.

  Specified by:
    `getContent` in interface `MetaDataFilter.Resource`
  Throws:
    `IOException`

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

Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.