public abstract class ArchiveInputStream extends java.io.InputStream
InputStream.read(byte, int, int)- or
read()- method so that reading from the stream generates EOF for the end of data in each entry as well as at the end of the file proper.
getNextEntry() method is used to reset the input stream
ready for reading the data from the next entry.
The input stream classes must also implement a method with the signature:
public static boolean matches(byte signature, int length)which is used by the
ArchiveStreamFactoryto autodetect the archive type from the first few bytes of a stream.
|Constructor and Description|
|Modifier and Type||Method and Description|
Whether this stream is able to read the given entry.
Returns the current number of bytes read from this stream.
this method may yield wrong results for large archives, use #getBytesRead instead
Returns the next Archive Entry in this Stream.
Reads a byte of data.
available, close, mark, markSupported, read, read, reset, skip
public abstract ArchiveEntry getNextEntry() throws java.io.IOException
nullif there are no more entries
java.io.IOException- if the next entry could not be read
public int read() throws java.io.IOException
InputStream.read(byte, int, int)method. MUST be overridden if the
InputStream.read(byte, int, int)method is not overridden; may be overridden otherwise.
java.io.IOException- if an I/O error has occurred
@Deprecated public int getCount()
public long getBytesRead()
public boolean canReadEntryData(ArchiveEntry archiveEntry)
Some archive formats support variants or details that are not supported (yet).
archiveEntry- the entry to test
Copyright © 2010 - 2020 Adobe. All Rights Reserved