There doesn't seem to exist a hint on the encoding of string values in any piece documentation. Given the main purpose of dump/restore is backing up a system it seems very likely the format uses the current default encoding of the system.
| Modifier and Type | Field and Description |
|---|---|
| private DumpArchiveEntry | |
| private byte[] | |
| private static final String | |
| private long | |
| private long | |
| private long | |
| private boolean | |
| private boolean | |
| private final Map | names
Map of ino -> dirent entry. |
| private static final String | |
| private final Map | pending
Map of ino -> (directory) entry when we're missing one or more elements in the path. |
| private final Queue | queue
Queue of (directory) entries where we now have the full path. |
| protected TapeInputStream | |
| private final byte[] | |
| private int | |
| private int | |
| private final DumpArchiveSummary | |
| private final ZipEncoding | zipEncoding
The encoding to use for file names and labels. |
| Access | Constructor and Description |
|---|---|
| public | DumpArchiveInputStream(final InputStream
stream to read from is)Constructor using the platform's default encoding for file names. |
| public | DumpArchiveInputStream(final InputStream
stream to read from is, final String the encoding to use for file names, use null for the platform's default encoding encoding)Constructs a new instance. |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Overrides java. Implements java. |
| public long | getBytesRead()
Overrides org. |
| public int | getCount()
Overrides org.
Deprecated
Gets the current number of bytes read from this stream.
|
| public DumpArchiveEntry | |
| public DumpArchiveEntry | getNextEntry()
Implements abstract org. |
| private String | Returns: full path for specified archive entry, or null if there's a gap.Gets full path for specified archive entry, or null if there's a gap. |
| public DumpArchiveSummary | |
| public static boolean | Returns: whether the buffer seems to contain dump datadata to match buffer, final int length of data length)Look at the first few bytes of the file to decide if it's a dump archive. |
| public int | Returns: The number of bytes read, or -1 at EOF.The buffer into which to place bytes read. buf, int The offset at which to place bytes read. off, int The number of bytes to read. len)Overrides java. |
| private void | |
| private void | |
| private void |
| active | back to summary |
|---|---|
| private DumpArchiveEntry active | |
| blockBuffer | back to summary |
|---|---|
| private byte[] blockBuffer | |
| CURRENT_PATH_SEGMENT | back to summary |
|---|---|
| private static final String CURRENT_PATH_SEGMENT | |
| entryOffset | back to summary |
|---|---|
| private long entryOffset | |
| entrySize | back to summary |
|---|---|
| private long entrySize | |
| filepos | back to summary |
|---|---|
| private long filepos | |
| hasHitEOF | back to summary |
|---|---|
| private boolean hasHitEOF | |
| isClosed | back to summary |
|---|---|
| private boolean isClosed | |
| names | back to summary |
|---|---|
| private final Map<Integer, Dirent> names Map of ino -> dirent entry. We can use this to reconstruct full paths. | |
| PARENT_PATH_SEGMENT | back to summary |
|---|---|
| private static final String PARENT_PATH_SEGMENT | |
| pending | back to summary |
|---|---|
| private final Map<Integer, DumpArchiveEntry> pending Map of ino -> (directory) entry when we're missing one or more elements in the path. | |
| queue | back to summary |
|---|---|
| private final Queue<DumpArchiveEntry> queue Queue of (directory) entries where we now have the full path. | |
| raw | back to summary |
|---|---|
| protected TapeInputStream raw | |
| readBuf | back to summary |
|---|---|
| private final byte[] readBuf | |
| readIdx | back to summary |
|---|---|
| private int readIdx | |
| recordOffset | back to summary |
|---|---|
| private int recordOffset | |
| summary | back to summary |
|---|---|
| private final DumpArchiveSummary summary | |
| zipEncoding | back to summary |
|---|---|
| private final ZipEncoding zipEncoding The encoding to use for file names and labels. | |
| DumpArchiveInputStream | back to summary |
|---|---|
| public DumpArchiveInputStream(final InputStream is) throws ArchiveException Constructor using the platform's default encoding for file names.
| |
| DumpArchiveInputStream | back to summary |
|---|---|
| public DumpArchiveInputStream(final InputStream is, final String encoding) throws ArchiveException Constructs a new instance.
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Closes the stream for this entry.
| |
| getBytesRead | back to summary |
|---|---|
| public long getBytesRead() Overrides org. Doc from org. Gets the current number of bytes read from this stream.
| |
| getCount | back to summary |
|---|---|
| public int getCount() Overrides org. Doc from org. Deprecated
Gets the current number of bytes read from this stream.
| |
| getNextDumpEntry | back to summary |
|---|---|
| public DumpArchiveEntry getNextDumpEntry() throws IOException
Deprecated Use Reads the next entry.
| |
| getNextEntry | back to summary |
|---|---|
| public DumpArchiveEntry getNextEntry() throws IOException Implements abstract org. Doc from org. Gets the next Archive Entry in this Stream.
| |
| getPath | back to summary |
|---|---|
| private String getPath(final DumpArchiveEntry entry) throws DumpArchiveException Gets full path for specified archive entry, or null if there's a gap.
| |
| getSummary | back to summary |
|---|---|
| public DumpArchiveSummary getSummary() Gets the archive summary information.
| |
| matches | back to summary |
|---|---|
| public static boolean matches(final byte[] buffer, final int length) Look at the first few bytes of the file to decide if it's a dump archive. With 32 bytes we can look at the magic value, with a full 1k we can verify the checksum.
| |
| read | back to summary |
|---|---|
| public int read(final byte[] buf, int off, int len) throws IOException Overrides java. Reads bytes from the current dump archive entry. This method is aware of the boundaries of the current entry in the archive and will deal with them as if they were this stream's start and EOF.
| |
| readBITS | back to summary |
|---|---|
| private void readBITS() throws IOException Read BITS segment. | |
| readCLRI | back to summary |
|---|---|
| private void readCLRI() throws IOException Read CLRI (deleted inode) segment. | |
| readDirectoryEntry | back to summary |
|---|---|
| private void readDirectoryEntry(DumpArchiveEntry entry) throws IOException Read directory entry. | |