Class TarFile.BoundedTarEntryInputStream
java.lang.Object
java.io.InputStream
org.apache.commons.compress.utils.BoundedArchiveInputStream
org.apache.commons.compress.archivers.tar.TarFile.BoundedTarEntryInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing class:
- TarFile
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SeekableByteChannelprivate intprivate final TarArchiveEntryprivate long -
Constructor Summary
ConstructorsConstructorDescriptionBoundedTarEntryInputStream(TarArchiveEntry entry, SeekableByteChannel channel) -
Method Summary
Modifier and TypeMethodDescriptionprotected intread(long pos, ByteBuffer buf) Read content of the stream into aByteBuffer.private intreadArchive(long pos, ByteBuffer buf) private intreadSparse(long pos, ByteBuffer buf, int numToRead) Methods inherited from class org.apache.commons.compress.utils.BoundedArchiveInputStream
read, readMethods inherited from class java.io.InputStream
available, close, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
channel
-
entry
-
entryOffset
private long entryOffset -
currentSparseInputStreamIndex
private int currentSparseInputStreamIndex
-
-
Constructor Details
-
BoundedTarEntryInputStream
BoundedTarEntryInputStream(TarArchiveEntry entry, SeekableByteChannel channel) throws IOException - Throws:
IOException
-
-
Method Details
-
read
Description copied from class:BoundedArchiveInputStreamRead content of the stream into aByteBuffer.- Specified by:
readin classBoundedArchiveInputStream- Parameters:
pos- position to start the read.buf- buffer to add the read content.- Returns:
- number of read bytes.
- Throws:
IOException- if I/O fails.
-
readSparse
- Throws:
IOException
-
readArchive
- Throws:
IOException
-