org.apache.commons.compress.archivers.tar
public final class TarInputStream extends FilterInputStream
Version: $Revision: 155439 $ $Date: 2006-08-28 08:10:02 +0200 (Mon, 28 Aug 2006) $
See Also: TarInputStream TarEntry
| Field Summary | |
|---|---|
| TarBuffer | m_buffer |
| TarEntry | m_currEntry |
| boolean | m_debug |
| int | m_entryOffset |
| int | m_entrySize |
| boolean | m_hasHitEOF |
| byte[] | m_oneBuf |
| byte[] | m_readBuf |
| Constructor Summary | |
|---|---|
| TarInputStream(InputStream input)
Construct a TarInputStream using specified input
stream and default block and record sizes.
| |
| TarInputStream(InputStream input, int blockSize)
Construct a TarInputStream using specified input
stream, block size and default record sizes.
| |
| TarInputStream(InputStream input, int blockSize, int recordSize)
Construct a TarInputStream using specified input
stream, block size and record sizes.
| |
| Method Summary | |
|---|---|
| int | available()
Get the available data that can be read from the current entry in the
archive. |
| void | close()
Closes this stream. |
| void | copyEntryContents(OutputStream output)
Copies the contents of the current tar archive entry directly into an
output stream.
|
| protected void | debug(String message)
Utility method to do debugging.
|
| TarEntry | getNextEntry()
Get the next entry in this tar archive. |
| int | getRecordSize()
Get the record size being used by this stream's TarBuffer.
|
| void | mark(int markLimit)
Since we do not support marking just yet, we do nothing.
|
| boolean | markSupported()
Since we do not support marking just yet, we return false.
|
| int | read()
Reads a byte from the current tar archive entry. |
| int | read(byte[] buffer)
Reads bytes from the current tar archive entry. |
| int | read(byte[] buffer, int offset, int count)
Reads bytes from the current tar archive entry. |
| void | reset()
Since we do not support marking just yet, we do nothing. |
| void | setDebug(boolean debug)
Sets the debugging flag.
|
| void | skip(int numToSkip)
Skip bytes in the input buffer. |
Parameters: input stream to create TarInputStream from
See Also: DEFAULT_BLOCKSIZE DEFAULT_RECORDSIZE
Parameters: input stream to create TarInputStream from blockSize the block size to use
See Also: DEFAULT_RECORDSIZE
Parameters: input stream to create TarInputStream from blockSize the block size to use recordSize the record size to use
Returns: The number of available bytes for the current entry.
Throws: IOException when an IO error causes operation to fail
Throws: IOException when an IO error causes operation to fail
Parameters: output The OutputStream into which to write the entry's data.
Throws: IOException when an IO error causes operation to fail
Parameters: message the message to use in debugging
Returns: The next TarEntry in the archive, or null.
Throws: IOException Description of Exception
Returns: The TarBuffer record size.
Parameters: markLimit The limit to mark.
Returns: False.
Returns: The byte read, or -1 at EOF.
Throws: IOException when an IO error causes operation to fail
Parameters: buffer The buffer into which to place bytes read.
Returns: The number of bytes read, or -1 at EOF.
Throws: IOException when an IO error causes operation to fail
Parameters: buffer The buffer into which to place bytes read. offset The offset at which to place bytes read. count The number of bytes to read.
Returns: The number of bytes read, or -1 at EOF.
Throws: IOException when an IO error causes operation to fail
Parameters: debug The new Debug value
Parameters: numToSkip The number of bytes to skip.
Throws: IOException when an IO error causes operation to fail