|
||||||||||
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.ar.ArArchiveInputStream
public class ArArchiveInputStream
Implements the "ar" archive format as an input stream.
Field Summary | |
---|---|
private boolean |
closed
|
private ArArchiveEntry |
currentEntry
|
private long |
entryOffset
|
private java.io.InputStream |
input
|
private byte[] |
namebuffer
|
private long |
offset
|
Constructor Summary | |
---|---|
ArArchiveInputStream(java.io.InputStream pInput)
Constructs an Ar input stream with the referenced stream |
Method Summary | |
---|---|
private int |
asInt(byte[] input)
|
private int |
asInt(byte[] input,
int base)
|
private long |
asLong(byte[] input)
|
void |
close()
|
private java.lang.String |
getExtendedName(int offset)
Get an extended name from the GNU extended name buffer. |
ArArchiveEntry |
getNextArEntry()
Returns the next AR entry in this stream. |
ArchiveEntry |
getNextEntry()
Returns the next Archive Entry in this Stream. |
static boolean |
matches(byte[] signature,
int length)
Checks if the signature matches ASCII "! |
int |
read(byte[] b,
int off,
int len)
|
Methods inherited from class org.apache.commons.compress.archivers.ArchiveInputStream |
---|
canReadEntryData, count, count, getBytesRead, getCount, 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 |
---|
private final java.io.InputStream input
private long offset
private boolean closed
private ArArchiveEntry currentEntry
private byte[] namebuffer
private long entryOffset
Constructor Detail |
---|
public ArArchiveInputStream(java.io.InputStream pInput)
pInput
- the ar input streamMethod Detail |
---|
public ArArchiveEntry getNextArEntry() throws java.io.IOException
java.io.IOException
- if the entry could not be readprivate java.lang.String getExtendedName(int offset) throws java.io.IOException
offset
- pointer to entry within the buffer
java.io.IOException
- if name not found or buffer not set upprivate long asLong(byte[] input)
private int asInt(byte[] input)
private int asInt(byte[] input, int base)
public ArchiveEntry getNextEntry() throws java.io.IOException
ArchiveInputStream
getNextEntry
in class ArchiveInputStream
null
if there are no more entries
java.io.IOException
- if the next entry could not be readpublic void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.InputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public static boolean matches(byte[] signature, int length)
signature
- the bytes to checklength
- the number of bytes to check
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |