Top Description Fields Constructors Methods
org.glassfish.hk2.classmodel.reflect.util

public Class InputStreamArchiveAdapter

extends AbstractAdapter
Class Inheritance
Imports
java.io.BufferedInputStream, .ByteArrayInputStream, .IOException, .InputStream, java.net.URI, java.util.Arrays, java.util.jar.JarEntry, .JarInputStream, .Manifest, java.util.logging.Level, .Logger

Archive adapter based on a single InputStream instance.
Author
Jerome Dochez

Field Summary

Modifier and TypeField and Description
private final InputStream
private final URI

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements java.io.Closeable.close.

Closes this stream and releases any system resources associated with it.

public Manifest
getManifest()

Implements org.glassfish.hk2.classmodel.reflect.ArchiveAdapter.getManifest.

Returns the manifest instance for the archive.

public URI
getURI()

Implements org.glassfish.hk2.classmodel.reflect.ArchiveAdapter.getURI.

Returns the URI of the archive

public void
Inherited from org.glassfish.hk2.classmodel.reflect.util.AbstractAdapter:
onAllEntries

Field Detail

isback to summary
private final InputStream is
uriback to summary
private final URI uri

Constructor Detail

InputStreamArchiveAdapterback to summary
public InputStreamArchiveAdapter(JarArchive parent, URI uri, InputStream is)

Method Detail

closeback to summary
public void close() throws IOException

Implements java.io.Closeable.close.

Doc from java.io.Closeable.close.

Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.

As noted in AutoCloseable#close(), cases where the close may fail require careful attention. It is strongly advised to relinquish the underlying resources and to internally mark the Closeable as closed, prior to throwing the IOException.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs
getManifestback to summary
public Manifest getManifest() throws IOException

Implements org.glassfish.hk2.classmodel.reflect.ArchiveAdapter.getManifest.

Doc from org.glassfish.hk2.classmodel.reflect.ArchiveAdapter.getManifest.

Returns the manifest instance for the archive.

Annotations
@Override
Exceptions
IOException:
if the manifest cannot be loaded.
getURIback to summary
public URI getURI()

Implements org.glassfish.hk2.classmodel.reflect.ArchiveAdapter.getURI.

Doc from org.glassfish.hk2.classmodel.reflect.ArchiveAdapter.getURI.

Returns the URI of the archive

Annotations
@Override
onSelectedEntriesback to summary
public void onSelectedEntries(ArchiveAdapter.Selector selector, ArchiveAdapter.EntryTask task, Logger logger) throws IOException

Implements org.glassfish.hk2.classmodel.reflect.ArchiveAdapter.onSelectedEntries.

Doc from org.glassfish.hk2.classmodel.reflect.ArchiveAdapter.onSelectedEntries.

perform a task on selected archive entries

Annotations
@Override
Exceptions
IOException:
can be generated while reading the archive entries