de.schlichtherle.util.zip
Class CRC32Exception

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.io.IOException
              extended by java.util.zip.ZipException
                  extended by 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:
TrueZIP 6.7
Author:
Christian Schlichtherle
See Also:
Serialized Form

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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

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.