Class ArArchiveInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- org.apache.commons.compress.archivers.ArchiveInputStream<ArArchiveEntry>
-
- org.apache.commons.compress.archivers.ar.ArArchiveInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class ArArchiveInputStream extends ArchiveInputStream<ArArchiveEntry>
Implements the "ar" archive format as an input stream.
-
-
Constructor Summary
Constructors Constructor Description ArArchiveInputStream(java.io.InputStream inputStream)Constructs an Ar input stream with the referenced stream
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclose()ArArchiveEntrygetNextArEntry()Deprecated.UsegetNextEntry().ArArchiveEntrygetNextEntry()Gets the next Archive Entry in this Stream.static booleanmatches(byte[] signature, int length)Checks if the signature matches ASCII "!<arch>" followed by a single LF control characterintread(byte[] b, int off, int len)-
Methods inherited from class org.apache.commons.compress.archivers.ArchiveInputStream
canReadEntryData, getBytesRead, getCharset, getCount, mark, markSupported, read, reset
-
-
-
-
Method Detail
-
matches
public static boolean matches(byte[] signature, int length)Checks if the signature matches ASCII "!<arch>" followed by a single LF control character- Parameters:
signature- the bytes to checklength- the number of bytes to check- Returns:
- true, if this stream is an Ar archive stream, false otherwise
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.FilterInputStream- Throws:
java.io.IOException
-
getNextArEntry
@Deprecated public ArArchiveEntry getNextArEntry() throws java.io.IOException
Deprecated.UsegetNextEntry().Returns the next AR entry in this stream.- Returns:
- the next AR entry.
- Throws:
java.io.IOException- if the entry could not be read
-
getNextEntry
public ArArchiveEntry getNextEntry() throws java.io.IOException
Description copied from class:ArchiveInputStreamGets the next Archive Entry in this Stream.- Specified by:
getNextEntryin classArchiveInputStream<ArArchiveEntry>- Returns:
- the next entry, or
nullif there are no more entries - Throws:
java.io.IOException- if the next entry could not be read
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException- Overrides:
readin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
-