de.schlichtherle.truezip.fs.archive.zip
Class CheckedZipInputShop
java.lang.Object
de.schlichtherle.truezip.zip.RawZipFile<ZipArchiveEntry>
de.schlichtherle.truezip.fs.archive.zip.ZipInputShop
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
| 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 |
CheckedZipInputShop
public CheckedZipInputShop(ReadOnlyFile rof,
ZipDriver driver)
throws IOException
- Throws:
IOException
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
Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.