de.schlichtherle.util.zip
Class CRC32Exception
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
java.util.zip.ZipException
de.schlichtherle.util.zip.CRC32Exception
- All Implemented Interfaces:
- Serializable
public class CRC32Exception
- extends ZipException
Thrown to indicate a CRC-32 mismatch between the declared value in the
Central File Header and the Data Descriptor or between the declared value
and the computed value from the decompressed data.
The prior case is detected on the call to BasicZipFile.getCheckedInputStream(java.lang.String),
whereas the latter case is detected when the input stream returned by this
method gets closed.
The exception's detail message is the name of the ZIP entry.
- Since:
- TrueZIP 6.1
- Version:
- $Id: CRC32Exception.java 5e709f50671d 2010/11/05 11:52:07 christian $
- Author:
- Christian Schlichtherle
- See Also:
- Serialized Form
|
Constructor Summary |
CRC32Exception(String entryName,
long expectedCrc,
long actualCrc)
Creates a new instance of CRC32Exception where the
given entry name is the detail message of the base class. |
|
Method Summary |
long |
getActualCrc()
Returns the CRC-32 value which has been computed from the contents
of the ZIP entry. |
long |
getExpectedCrc()
Returns the CRC-32 value which has been read from the ZIP file. |
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
expectedCrc
final long expectedCrc
actualCrc
final long actualCrc
CRC32Exception
CRC32Exception(String entryName,
long expectedCrc,
long actualCrc)
- Creates a new instance of
CRC32Exception where the
given entry name is the detail message of the base class.
- See Also:
Throwable.getMessage(),
getExpectedCrc(),
getActualCrc()
getExpectedCrc
public long getExpectedCrc()
- Returns the CRC-32 value which has been read from the ZIP file.
getActualCrc
public long getActualCrc()
- Returns the CRC-32 value which has been computed from the contents
of the ZIP entry.
Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.