| Modifier and Type | Field and Description |
|---|---|
| private static final Pattern | |
| pack-priv static final String | |
| private static final int | |
| private boolean | |
| private ArArchiveEntry | |
| private long | entryOffset
The offset where the current entry started. |
| private static final int | |
| private static final int | |
| private static final Pattern | |
| private static final String | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private final byte[] | metaData
Cached buffer for meta data - must only be used locally in the class (COMPRESS-172 - reduce garbage collection). |
| private static final int | |
| private static final int | |
| private byte[] | namebuffer
Storage area for extra long names (GNU ar). |
| private long | |
| private static final int | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| public | ArArchiveInputStream(final InputStream
the ar input stream inputStream)Constructs an Ar input stream with the referenced stream |
| Modifier and Type | Method and Description |
|---|---|
| private int | |
| private int | |
| private int | |
| private int | asInt(final byte[] byteArray, final int offset, final int len, final int base, final boolean treatBlankAsZero)
|
| private long | |
| public void | close()
Overrides java. Implements java. |
| private String | getBSDLongName(final String bsdLongName)
Reads the real name from the current stream assuming the very first bytes to be read are the real file name. |
| private String | Returns: the extended file name; without trailing "/" if present.pointer to entry within the buffer offset)Gets an extended name from the GNU extended name buffer. |
| public ArArchiveEntry | Returns: the next AR entry.
Deprecated
Use
Returns the next AR entry in this stream.
getNextEntry().
|
| public ArArchiveEntry | getNextEntry()
Implements abstract org. |
| private static boolean | isBSDLongName(final String name)
Does the name look like it is a long name (or a name containing spaces) as encoded by BSD ar? |
| private boolean | isGNULongName(final String name)
Does the name look like it is a long name (or a name containing spaces) as encoded by SVR4/GNU ar? |
| private static boolean | isGNUStringTable(final String name)
Is this the name of the "Archive String Table" as used by SVR4/GNU to store long file names? |
| public static boolean | Returns: true, if this stream is an Ar archive stream, false otherwisethe bytes to check signature, final int the number of bytes to check length)Checks if the signature matches ASCII "! |
| public int | read(final byte[]
the buffer into which the data is read. b, final int the start offset in array off, final int b
at which the data is written.the maximum number of bytes to read. len)Overrides java. len bytes of data from this input stream
into an array of bytes.
|
| private ArArchiveEntry | readGNUStringTable(final byte[] length, final int offset, final int len)
Reads the GNU archive String Table. |
| private void |
| BSD_LONGNAME_PATTERN | back to summary |
|---|---|
| private static final Pattern BSD_LONGNAME_PATTERN | |
| BSD_LONGNAME_PREFIX | back to summary |
|---|---|
| pack-priv static final String BSD_LONGNAME_PREFIX | |
| BSD_LONGNAME_PREFIX_LEN | back to summary |
|---|---|
| private static final int BSD_LONGNAME_PREFIX_LEN | |
| closed | back to summary |
|---|---|
| private boolean closed | |
| currentEntry | back to summary |
|---|---|
| private ArArchiveEntry currentEntry | |
| entryOffset | back to summary |
|---|---|
| private long entryOffset The offset where the current entry started. -1 if no entry has been called | |
| FILE_MODE_LEN | back to summary |
|---|---|
| private static final int FILE_MODE_LEN | |
| FILE_MODE_OFFSET | back to summary |
|---|---|
| private static final int FILE_MODE_OFFSET | |
| GNU_LONGNAME_PATTERN | back to summary |
|---|---|
| private static final Pattern GNU_LONGNAME_PATTERN | |
| GNU_STRING_TABLE_NAME | back to summary |
|---|---|
| private static final String GNU_STRING_TABLE_NAME | |
| GROUP_ID_LEN | back to summary |
|---|---|
| private static final int GROUP_ID_LEN | |
| GROUP_ID_OFFSET | back to summary |
|---|---|
| private static final int GROUP_ID_OFFSET | |
| LAST_MODIFIED_LEN | back to summary |
|---|---|
| private static final int LAST_MODIFIED_LEN | |
| LAST_MODIFIED_OFFSET | back to summary |
|---|---|
| private static final int LAST_MODIFIED_OFFSET | |
| LENGTH_LEN | back to summary |
|---|---|
| private static final int LENGTH_LEN | |
| LENGTH_OFFSET | back to summary |
|---|---|
| private static final int LENGTH_OFFSET | |
| metaData | back to summary |
|---|---|
| private final byte[] metaData Cached buffer for meta data - must only be used locally in the class (COMPRESS-172 - reduce garbage collection). | |
| NAME_LEN | back to summary |
|---|---|
| private static final int NAME_LEN | |
| NAME_OFFSET | back to summary |
|---|---|
| private static final int NAME_OFFSET | |
| namebuffer | back to summary |
|---|---|
| private byte[] namebuffer Storage area for extra long names (GNU ar). | |
| offset | back to summary |
|---|---|
| private long offset | |
| USER_ID_LEN | back to summary |
|---|---|
| private static final int USER_ID_LEN | |
| USER_ID_OFFSET | back to summary |
|---|---|
| private static final int USER_ID_OFFSET | |
| ArArchiveInputStream | back to summary |
|---|---|
| public ArArchiveInputStream(final InputStream inputStream) Constructs an Ar input stream with the referenced stream
| |
| asInt | back to summary |
|---|---|
| private int asInt(final byte[] byteArray, final int offset, final int len) throws IOException | |
| asInt | back to summary |
|---|---|
| private int asInt(final byte[] byteArray, final int offset, final int len, final boolean treatBlankAsZero) throws IOException | |
| asInt | back to summary |
|---|---|
| private int asInt(final byte[] byteArray, final int offset, final int len, final int base) throws IOException | |
| asInt | back to summary |
|---|---|
| private int asInt(final byte[] byteArray, final int offset, final int len, final int base, final boolean treatBlankAsZero) throws IOException | |
| asLong | back to summary |
|---|---|
| private long asLong(final byte[] byteArray, final int offset, final int len) throws IOException | |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Doc from java. Closes this input stream and releases any system resources associated with the stream.
| |
| getBSDLongName | back to summary |
|---|---|
| private String getBSDLongName(final String bsdLongName) throws IOException Reads the real name from the current stream assuming the very first bytes to be read are the real file name.
| |
| getExtendedName | back to summary |
|---|---|
| private String getExtendedName(final int offset) throws IOException Gets an extended name from the GNU extended name buffer.
| |
| getNextArEntry | back to summary |
|---|---|
| public ArArchiveEntry getNextArEntry() throws IOException
Deprecated Use Returns the next AR entry in this stream.
| |
| getNextEntry | back to summary |
|---|---|
| public ArArchiveEntry getNextEntry() throws IOException Implements abstract org. Doc from org. Gets the next Archive Entry in this Stream.
| |
| isBSDLongName | back to summary |
|---|---|
| private static boolean isBSDLongName(final String name) Does the name look like it is a long name (or a name containing spaces) as encoded by BSD ar? From the FreeBSD ar(5) man page:
BSD In the BSD variant, names that are shorter than 16
characters and without embedded spaces are stored
directly in this field. If a name has an embedded
space, or if it is longer than 16 characters, then
the string "#1/" followed by the decimal represen-
tation of the length of the file name is placed in
this field. The actual file name is stored immedi-
ately after the archive header. The content of the
archive member follows the file name. The ar_size
field of the header (see below) will then hold the
sum of the size of the file name and the size of
the member.
| |
| isGNULongName | back to summary |
|---|---|
| private boolean isGNULongName(final String name) Does the name look like it is a long name (or a name containing spaces) as encoded by SVR4/GNU ar?
| |
| isGNUStringTable | back to summary |
|---|---|
| private static boolean isGNUStringTable(final String name) Is this the name of the "Archive String Table" as used by SVR4/GNU to store long file names? GNU ar stores multiple extended file names in the data section of a file with the name "//", this record is referred to by future headers. A header references an extended file name by storing a "/" followed by a decimal offset to the start of the file name in the extended file name data section. The format of the "//" file itself is simply a list of the long file names, each separated by one or more LF characters. Note that the decimal offsets are number of characters, not line or string number within the "//" file. | |
| matches | back to summary |
|---|---|
| public static boolean matches(final byte[] signature, final int length) Checks if the signature matches ASCII "!<arch>" followed by a single LF control character
| |
| read | back to summary |
|---|---|
| public int read(final byte[] b, final int off, final int len) throws IOException Overrides java. Doc from java. Reads up to
| |
| readGNUStringTable | back to summary |
|---|---|
| private ArArchiveEntry readGNUStringTable(final byte[] length, final int offset, final int len) throws IOException Reads the GNU archive String Table.
| |
| trackReadBytes | back to summary |
|---|---|
| private void trackReadBytes(final long read) | |