de.schlichtherle.io.archive.zip
Class CheckedReadOnlySfxDriver
java.lang.Object
de.schlichtherle.io.archive.spi.AbstractArchiveDriver
de.schlichtherle.io.archive.zip.ZipDriver
de.schlichtherle.io.archive.zip.AbstractSfxDriver
de.schlichtherle.io.archive.zip.ReadOnlySfxDriver
de.schlichtherle.io.archive.zip.CheckedReadOnlySfxDriver
- All Implemented Interfaces:
- ArchiveDriver, Serializable
public class CheckedReadOnlySfxDriver
- extends ReadOnlySfxDriver
An archive driver for SFX/EXE files which checks the CRC-32 value for all
ZIP entries in input archives.
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.
This exception is then propagated through the stack up to the corresponding
file operation in the package de.schlichtherle.io where it is
either allowed to pass on or is catched and processed accordingly.
For example, the FilterInputStream.close()
method would allow the CRC32Exception to pass on to the
client application, whereas the
File.catTo(OutputStream) method would simply
return false.
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.
Instances of this class are immutable.
- Since:
- TrueZIP 6.1
- Version:
- $Id: CheckedReadOnlySfxDriver.java 06f3ba684701 2010/11/04 01:15:55 christian $
- Author:
- Christian Schlichtherle
- See Also:
ReadWriteSfxDriver,
CheckedZipInputArchive,
Serialized Form
|
Constructor Summary |
CheckedReadOnlySfxDriver()
Equivalent to this(DEFAULT_CHARSET, null, null, false, DEFAULT_LEVEL). |
CheckedReadOnlySfxDriver(int level)
Equivalent to this(DEFAULT_CHARSET, null, null, false, level). |
CheckedReadOnlySfxDriver(String charset)
Equivalent to this(charset, null, null, false, DEFAULT_LEVEL). |
CheckedReadOnlySfxDriver(String charset,
Icon openIcon,
Icon closedIcon,
boolean postambled,
int level)
Constructs a new checked read-only SFX/EXE driver. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
CheckedReadOnlySfxDriver
public CheckedReadOnlySfxDriver()
- Equivalent to
this(DEFAULT_CHARSET, null, null, false, DEFAULT_LEVEL).
CheckedReadOnlySfxDriver
public CheckedReadOnlySfxDriver(String charset)
- Equivalent to
this(charset, null, null, false, DEFAULT_LEVEL).
CheckedReadOnlySfxDriver
public CheckedReadOnlySfxDriver(int level)
- Equivalent to
this(DEFAULT_CHARSET, null, null, false, level).
CheckedReadOnlySfxDriver
public CheckedReadOnlySfxDriver(String charset,
Icon openIcon,
Icon closedIcon,
boolean postambled,
int level)
- Constructs a new checked read-only SFX/EXE driver.
createZipInputArchive
protected ZipInputArchive createZipInputArchive(Archive archive,
ReadOnlyFile rof)
throws IOException
- Overrides:
createZipInputArchive in class ZipDriver
- Throws:
IOException
Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.