org.codehaus.plexus.archiver.zip

Class ZipFile.BoundedInputStream

Enclosing Class:
ZipFile

private class ZipFile.BoundedInputStream
extends InputStream

InputStream that delegates requests to the underlying RandomAccessFile, making sure that only bytes from a certain range can be read.

Field Summary

private boolean
addDummyByte
private long
loc
private long
remaining

Constructor Summary

BoundedInputStream(long start, long remaining)

Method Summary

(package private) void
addDummy()
Inflater needs an extra dummy byte for nowrap - see Inflater's javadocs.
int
read()
int
read(byte[] b, int off, int len)

Field Details

addDummyByte

private boolean addDummyByte

loc

private long loc

remaining

private long remaining

Constructor Details

BoundedInputStream

(package private)  BoundedInputStream(long start,
                                      long remaining)

Method Details

addDummy

(package private)  void addDummy()
Inflater needs an extra dummy byte for nowrap - see Inflater's javadocs.

read

public int read()
            throws IOException

read

public int read(byte[] b,
                int off,
                int len)
            throws IOException