org.glassfish.hk2.classmodel.reflect
Interface ArchiveAdapter

All Superinterfaces:
java.lang.Iterable<ArchiveAdapter.Entry>
All Known Implementing Classes:
DirectoryArchive, JarArchive

public interface ArchiveAdapter
extends java.lang.Iterable<ArchiveAdapter.Entry>

adapter for reading archive style structure

Author:
Jerome Dochez

Nested Class Summary
static class ArchiveAdapter.Entry
           
 
Method Summary
 java.io.InputStream getInputStream(java.lang.String entry)
          Returns an input stream to read the content of the archive entry
 java.util.jar.Manifest getManifest()
          Returns the manifest instance for the archive.
 java.lang.String getName()
          Returns the name of the archive
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

getName

java.lang.String getName()
Returns the name of the archive

Returns:
name of the archive

getInputStream

java.io.InputStream getInputStream(java.lang.String entry)
                                   throws java.io.IOException
Returns an input stream to read the content of the archive entry

Parameters:
entry - name of the entry to read from
Returns:
InputStream instance to read the entry content from
Throws:
java.io.IOException - when the InputStream instance cannot be created.

getManifest

java.util.jar.Manifest getManifest()
                                   throws java.io.IOException
Returns the manifest instance for the archive.

Returns:
the archive's manifest
Throws:
java.io.IOException - if the manifest cannot be loaded.


Copyright © 2010 Sun Microsystems, Inc.. All Rights Reserved.