|
TrueZIP 6.8.3 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface InputArchive
Defines the interface used to read entries from an archive file.
Implementations do not need to be thread safe:
Multithreading is addressed in the package de.schlichtherle.io.
| Method Summary | |
|---|---|
void |
close()
Closes this input archive and releases any system resources associated with it. |
Enumeration |
getArchiveEntries()
Returns an enumeration of the ArchiveEntry instances in this
archive. |
ArchiveEntry |
getArchiveEntry(String entryName)
Returns the ArchiveEntry for the given entry name or
null if no entry with this name exists. |
InputStream |
getInputStream(ArchiveEntry entry,
ArchiveEntry dstEntry)
Returns a new InputStream for reading the contents of the
given archive entry. |
InputArchiveMetaData |
getMetaData()
Returns the meta data for this input archive. |
int |
getNumArchiveEntries()
Returns the number of ArchiveEntry instances in this archive. |
void |
setMetaData(InputArchiveMetaData metaData)
Sets the meta data for this input archive. |
| Method Detail |
|---|
int getNumArchiveEntries()
ArchiveEntry instances in this archive.
Enumeration getArchiveEntries()
ArchiveEntry instances in this
archive.
ArchiveEntry getArchiveEntry(String entryName)
ArchiveEntry for the given entry name or
null if no entry with this name exists.
entryName - A valid archive entry name - never null.
InputStream getInputStream(ArchiveEntry entry,
ArchiveEntry dstEntry)
throws InputArchiveBusyException,
FileNotFoundException,
IOException
InputStream for reading the contents of the
given archive entry.
The returned stream should preferrably be unbuffered, as buffering is usually done in higher layers (all copy routines in TrueZIP do this and most client applications do it, too). Buffering twice does not increase, but decrease performance.
Note that the stream is guaranteed to be closed before the
close() method of this archive is called!
entry - A valid reference to an archive entry.
The runtime class of this entry is the same as the runtime class
of the entries returned by getArchiveEntries().dstEntry - If not null, this identifies the entry
to which TrueZIP is actually copying data to and should be
used to implement the Direct Data Copying (DDC) feature.
Note that there is no guarantee on the runtime type of this
object; it may have been created by other drivers.
For example, the ZIP driver family uses this to determine if data should be provided in its deflated form if the destination entry is another ZIP file entry.
InputStream to read the
archive entry data from.
null is not allowed!
InputArchiveBusyException - If the archive is currently busy
on input for another entry.
This exception is guaranteed to be recoverable, meaning it
should be possible to read the same entry again as soon as
the archive is not busy on input anymore.
FileNotFoundException - If the archive entry does not exist or
is not accessible for some reason.
IOException - On any other exceptional condition.
void close()
throws IOException
IOException - On any I/O related issue.InputArchiveMetaData getMetaData()
null.
void setMetaData(InputArchiveMetaData metaData)
metaData - The meta data - may not be null.
|
TrueZIP 6.8.3 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||