org.glassfish.hk2.classmodel.reflect
Interface ArchiveAdapter

All Superinterfaces:
java.io.Closeable
All Known Implementing Classes:
DirectoryArchive, InputStreamArchiveAdapter, JarArchive

public interface ArchiveAdapter
extends java.io.Closeable

adapter for reading archive style structure

Author:
Jerome Dochez

Nested Class Summary
static class ArchiveAdapter.Entry
          Definition of an archive entry
static interface ArchiveAdapter.EntryTask
          defines the notion of an archive entry task which is a task aimed to be run on particular archive entry.
 
Method Summary
 java.util.jar.Manifest getManifest()
          Returns the manifest instance for the archive.
 java.net.URI getURI()
          Returns the URI of the archive
 void onEachEntry(ArchiveAdapter.EntryTask task)
          perform a task on each archive entry
 
Methods inherited from interface java.io.Closeable
close
 

Method Detail

getURI

java.net.URI getURI()
Returns the URI of the archive

Returns:
URI of the archive

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.

onEachEntry

void onEachEntry(ArchiveAdapter.EntryTask task)
                 throws java.io.IOException
perform a task on each archive entry

Parameters:
task - the task to perform
Throws:
java.io.IOException - can be generated while reading the archive entries


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