public class DumpArchiveInputStream extends ArchiveInputStream
| Modifier and Type | Field and Description |
|---|---|
private DumpArchiveEntry |
active |
private byte[] |
blockBuffer |
(package private) java.lang.String |
encoding |
private long |
entryOffset |
private long |
entrySize |
private long |
filepos |
private boolean |
hasHitEOF |
private boolean |
isClosed |
private java.util.Map<java.lang.Integer,Dirent> |
names |
private java.util.Map<java.lang.Integer,DumpArchiveEntry> |
pending |
private java.util.Queue<DumpArchiveEntry> |
queue |
protected TapeInputStream |
raw |
private byte[] |
readBuf |
private int |
readIdx |
private int |
recordOffset |
private DumpArchiveSummary |
summary |
private ZipEncoding |
zipEncoding
The encoding to use for filenames and labels.
|
| Constructor and Description |
|---|
DumpArchiveInputStream(java.io.InputStream is)
Constructor using the platform's default encoding for file
names.
|
DumpArchiveInputStream(java.io.InputStream is,
java.lang.String encoding)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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()
Returns the next Archive Entry in this Stream.
|
private java.lang.String |
getPath(DumpArchiveEntry entry)
Get full path for specified archive entry, or null if there's a gap.
|
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.
|
private void |
readBITS()
Read BITS segment.
|
private void |
readCLRI()
Read CLRI (deleted inode) segment.
|
private void |
readDirectoryEntry(DumpArchiveEntry entry)
Read directory entry.
|
canReadEntryData, count, count, pushedBackBytes, readprivate DumpArchiveSummary summary
private DumpArchiveEntry active
private boolean isClosed
private boolean hasHitEOF
private long entrySize
private long entryOffset
private int readIdx
private final byte[] readBuf
private byte[] blockBuffer
private int recordOffset
private long filepos
protected TapeInputStream raw
private final java.util.Map<java.lang.Integer,Dirent> names
private final java.util.Map<java.lang.Integer,DumpArchiveEntry> pending
private java.util.Queue<DumpArchiveEntry> queue
private final ZipEncoding zipEncoding
final java.lang.String encoding
public DumpArchiveInputStream(java.io.InputStream is)
throws ArchiveException
is - stream to read fromArchiveException - on errorpublic DumpArchiveInputStream(java.io.InputStream is,
java.lang.String encoding)
throws ArchiveException
is - stream to read fromencoding - the encoding to use for file names, use null
for the platform's default encodingArchiveException - on error@Deprecated public int getCount()
ArchiveInputStreamgetCount in class ArchiveInputStreampublic long getBytesRead()
ArchiveInputStreamgetBytesRead in class ArchiveInputStreampublic DumpArchiveSummary getSummary()
private void readCLRI()
throws java.io.IOException
java.io.IOExceptionprivate void readBITS()
throws java.io.IOException
java.io.IOExceptionpublic DumpArchiveEntry getNextDumpEntry() throws java.io.IOException
java.io.IOException - on errorpublic DumpArchiveEntry getNextEntry() throws java.io.IOException
ArchiveInputStreamgetNextEntry in class ArchiveInputStreamnull if there are no more entriesjava.io.IOException - if the next entry could not be readprivate void readDirectoryEntry(DumpArchiveEntry entry) throws java.io.IOException
java.io.IOExceptionprivate java.lang.String getPath(DumpArchiveEntry entry)
entry - public int read(byte[] buf,
int off,
int len)
throws java.io.IOException
read in class java.io.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.java.io.IOException - on errorpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOExceptionpublic static boolean matches(byte[] buffer,
int length)
buffer - data to matchlength - length of data