TrueZIP 6.8.2

de.schlichtherle.util.zip
Class BasicZipFile.RawCheckedInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by de.schlichtherle.util.zip.BasicZipFile.RawCheckedInputStream
All Implemented Interfaces:
Closeable
Enclosing class:
BasicZipFile

private static final class BasicZipFile.RawCheckedInputStream
extends FilterInputStream

A stream which reads and returns deflated data from its input while a CRC-32 checksum is computed over the inflated data and checked in the method close.


Field Summary
private  boolean closed
           
private  Checksum crc
           
private  ZipEntry entry
           
private  Inflater inf
           
private  byte[] infBuf
           
private  byte[] singleByteBuf
           
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
BasicZipFile.RawCheckedInputStream(InputStream in, ZipEntry entry, int size)
           
 
Method Summary
 void close()
           
private  void ensureOpen()
           
 void mark(int readlimit)
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] buf, int off, int len)
           
 void reset()
           
 long skip(long toSkip)
           
 
Methods inherited from class java.io.FilterInputStream
available, read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

crc

private final Checksum crc

singleByteBuf

private final byte[] singleByteBuf

inf

private final Inflater inf

infBuf

private final byte[] infBuf

entry

private final ZipEntry entry

closed

private boolean closed
Constructor Detail

BasicZipFile.RawCheckedInputStream

public BasicZipFile.RawCheckedInputStream(InputStream in,
                                          ZipEntry entry,
                                          int size)
Method Detail

ensureOpen

private void ensureOpen()
                 throws IOException
Throws:
IOException

read

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

read

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

skip

public long skip(long toSkip)
          throws IOException
Overrides:
skip in class FilterInputStream
Throws:
IOException

close

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

mark

public void mark(int readlimit)
Overrides:
mark in class FilterInputStream

reset

public void reset()
           throws IOException
Overrides:
reset in class FilterInputStream
Throws:
IOException

markSupported

public boolean markSupported()
Overrides:
markSupported in class FilterInputStream

TrueZIP 6.8.2

Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.