TrueZIP Driver ZIP 7.1

de.schlichtherle.truezip.fs.archive.zip
Class CheckedZipInputShop

java.lang.Object
  extended by de.schlichtherle.truezip.zip.RawZipFile<ZipArchiveEntry>
      extended by de.schlichtherle.truezip.fs.archive.zip.ZipInputShop
          extended by de.schlichtherle.truezip.fs.archive.zip.CheckedZipInputShop
All Implemented Interfaces:
EntryContainer<ZipArchiveEntry>, InputService<ZipArchiveEntry>, InputShop<ZipArchiveEntry>, Closeable, Iterable<ZipArchiveEntry>

@DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class)
public class CheckedZipInputShop
extends ZipInputShop

A ZipInputShop which checks the CRC-32 value for all ZIP entries. The additional CRC-32 computation makes this class slower than its super class.

If there is a mismatch of the CRC-32 values for a ZIP entry in an input archive, the InputStream.close() method of the corresponding stream for the archive entry will throw a CRC32Exception. Other than this, the archive entry will be processed normally. So if just the CRC-32 value for the entry in the archive file has been modified, you can still read its entire contents.

Author:
Christian Schlichtherle
See Also:
CheckedZipDriver

Field Summary
 
Fields inherited from class de.schlichtherle.truezip.zip.RawZipFile
DEFAULT_CHARSET
 
Constructor Summary
CheckedZipInputShop(ReadOnlyFile rof, ZipDriver driver)
           
 
Method Summary
 InputSocket<ZipArchiveEntry> getInputSocket(String name)
          Overridden to read from a checked input stream.
 
Methods inherited from class de.schlichtherle.truezip.fs.archive.zip.ZipInputShop
getSize
 
Methods inherited from class de.schlichtherle.truezip.zip.RawZipFile
busy, close, getCharset, getCheckedInputStream, getCheckedInputStream, getComment, getEntry, getInputStream, getInputStream, getInputStream, getPostambleInputStream, getPostambleLength, getPreambleInputStream, getPreambleLength, iterator, length, offsetsConsiderPreamble, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.Closeable
close
 
Methods inherited from interface de.schlichtherle.truezip.entry.EntryContainer
getEntry, iterator
 

Constructor Detail

CheckedZipInputShop

public CheckedZipInputShop(ReadOnlyFile rof,
                           ZipDriver driver)
                    throws IOException
Throws:
IOException
Method Detail

getInputSocket

public InputSocket<ZipArchiveEntry> getInputSocket(String name)
Overridden to read from a checked input stream.

Specified by:
getInputSocket in interface InputService<ZipArchiveEntry>
Overrides:
getInputSocket in class ZipInputShop

TrueZIP Driver ZIP 7.1

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