|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
org.apache.commons.compress.archivers.ArchiveInputStream
org.apache.commons.compress.archivers.dump.DumpArchiveInputStream
public class DumpArchiveInputStream
The DumpArchiveInputStream reads a UNIX dump archive as an InputStream. Methods are provided to position at each successive entry in the archive, and the read each entry as a normal input stream using read().
| Field Summary | |
|---|---|
protected org.apache.commons.compress.archivers.dump.TapeInputStream |
raw
|
| Constructor Summary | |
|---|---|
DumpArchiveInputStream(InputStream is)
Constructor. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the stream for this entry. |
long |
getBytesRead()
Returns the current number of bytes read from this stream. |
int |
getCount()
Deprecated. |
DumpArchiveEntry |
getNextDumpEntry()
Read the next entry. |
DumpArchiveEntry |
getNextEntry()
Read the next entry. |
DumpArchiveSummary |
getSummary()
Return the archive summary information. |
static boolean |
matches(byte[] buffer,
int length)
Look at the first few bytes of the file to decide if it's a dump archive. |
int |
read(byte[] buf,
int off,
int len)
Reads bytes from the current dump archive entry. |
| Methods inherited from class org.apache.commons.compress.archivers.ArchiveInputStream |
|---|
canReadEntryData, count, count, pushedBackBytes, read |
| Methods inherited from class java.io.InputStream |
|---|
available, mark, markSupported, read, reset, skip |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.apache.commons.compress.archivers.dump.TapeInputStream raw
| Constructor Detail |
|---|
public DumpArchiveInputStream(InputStream is)
throws ArchiveException
is -
ArchiveException| Method Detail |
|---|
@Deprecated public int getCount()
ArchiveInputStream
getCount in class ArchiveInputStreampublic long getBytesRead()
ArchiveInputStream
getBytesRead in class ArchiveInputStreampublic DumpArchiveSummary getSummary()
public DumpArchiveEntry getNextDumpEntry()
throws IOException
IOException
public DumpArchiveEntry getNextEntry()
throws IOException
getNextEntry in class ArchiveInputStreamnull if there are no more entries
IOException - if the next entry could not be read
public int read(byte[] buf,
int off,
int len)
throws IOException
read in class InputStreambuf - The buffer into which to place bytes read.off - The offset at which to place bytes read.len - The number of bytes to read.
IOException - on error
public void close()
throws IOException
close in interface Closeableclose in class InputStreamIOException
public static boolean matches(byte[] buffer,
int length)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||