org.glassfish.hk2.classmodel.reflect.util
Class DirectoryArchive

java.lang.Object
  extended by org.glassfish.hk2.classmodel.reflect.util.DirectoryArchive
All Implemented Interfaces:
java.io.Closeable, ArchiveAdapter

public class DirectoryArchive
extends java.lang.Object
implements ArchiveAdapter

Directory base archive abstraction


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.glassfish.hk2.classmodel.reflect.ArchiveAdapter
ArchiveAdapter.Entry, ArchiveAdapter.EntryTask
 
Field Summary
 java.io.File directory
           
 
Constructor Summary
DirectoryArchive(java.io.File directory)
           
 
Method Summary
 void close()
           
 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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

directory

public final java.io.File directory
Constructor Detail

DirectoryArchive

public DirectoryArchive(java.io.File directory)
Method Detail

getURI

public java.net.URI getURI()
Description copied from interface: ArchiveAdapter
Returns the URI of the archive

Specified by:
getURI in interface ArchiveAdapter
Returns:
URI of the archive

getManifest

public java.util.jar.Manifest getManifest()
                                   throws java.io.IOException
Description copied from interface: ArchiveAdapter
Returns the manifest instance for the archive.

Specified by:
getManifest in interface ArchiveAdapter
Returns:
the archive's manifest
Throws:
java.io.IOException - if the manifest cannot be loaded.

onEachEntry

public void onEachEntry(ArchiveAdapter.EntryTask task)
                 throws java.io.IOException
Description copied from interface: ArchiveAdapter
perform a task on each archive entry

Specified by:
onEachEntry in interface ArchiveAdapter
Parameters:
task - the task to perform
Throws:
java.io.IOException - can be generated while reading the archive entries

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Throws:
java.io.IOException


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