net.lingala.zip4j.io
Class InflaterInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by net.lingala.zip4j.io.BaseInputStream
          extended by net.lingala.zip4j.io.PartInputStream
              extended by net.lingala.zip4j.io.InflaterInputStream
All Implemented Interfaces:
Closeable

public class InflaterInputStream
extends PartInputStream


Constructor Summary
InflaterInputStream(RandomAccessFile raf, long start, long len, UnzipEngine unzipEngine)
           
 
Method Summary
 int available()
          Returns 0 after EOF has been reached, otherwise always return 1.
 void close()
           
 UnzipEngine getUnzipEngine()
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 void seek(long pos)
           
 long skip(long n)
          Skips specified number of bytes of uncompressed data.
 
Methods inherited from class java.io.InputStream
mark, markSupported, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InflaterInputStream

public InflaterInputStream(RandomAccessFile raf,
                           long start,
                           long len,
                           UnzipEngine unzipEngine)
Method Detail

read

public int read()
         throws IOException
Overrides:
read in class PartInputStream
Throws:
IOException

read

public int read(byte[] b)
         throws IOException
Overrides:
read in class PartInputStream
Throws:
IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Overrides:
read in class PartInputStream
Throws:
IOException

skip

public long skip(long n)
          throws IOException
Skips specified number of bytes of uncompressed data.

Overrides:
skip in class PartInputStream
Parameters:
n - the number of bytes to skip
Returns:
the actual number of bytes skipped.
Throws:
IOException - if an I/O error has occurred
IllegalArgumentException - if n < 0

seek

public void seek(long pos)
          throws IOException
Overrides:
seek in class PartInputStream
Throws:
IOException

available

public int available()
Returns 0 after EOF has been reached, otherwise always return 1.

Programs should not count on this method to return the actual number of bytes that could be read without blocking.

Overrides:
available in class PartInputStream
Returns:
1 before EOF and 0 after EOF.
Throws:
IOException - if an I/O error occurs.

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class PartInputStream
Throws:
IOException

getUnzipEngine

public UnzipEngine getUnzipEngine()
Overrides:
getUnzipEngine in class PartInputStream


Copyright © 2012. All Rights Reserved.