org.codehaus.plexus.archiver.zip
Class ZipFile.BoundedInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byorg.codehaus.plexus.archiver.zip.ZipFile.BoundedInputStream
Enclosing class:
ZipFile

private class ZipFile.BoundedInputStream
extends java.io.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
           
 
Fields inherited from class java.io.InputStream
 
Constructor Summary
(package private) ZipFile.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)
           
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

remaining

private long remaining

loc

private long loc

addDummyByte

private boolean addDummyByte
Constructor Detail

ZipFile.BoundedInputStream

ZipFile.BoundedInputStream(long start,
                           long remaining)
Method Detail

read

public int read()
         throws java.io.IOException
Throws:
java.io.IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Throws:
java.io.IOException

addDummy

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