de.schlichtherle.io.archive.spi
Class AbstractArchiveDriver.InconsistentCharsetSupportError
java.lang.Object
java.lang.Throwable
java.lang.Error
de.schlichtherle.io.archive.spi.AbstractArchiveDriver.InconsistentCharsetSupportError
- All Implemented Interfaces:
- Serializable
- Enclosing class:
- AbstractArchiveDriver
protected static final class AbstractArchiveDriver.InconsistentCharsetSupportError
- extends Error
Thrown to indicate that the character set implementation in the Java
Runtime Environment (JRE) for the Java Standard Edition (JSE) is broken
and needs fixing.
This error is thrown if and only if the character set provided to the
constructor of the enclosing class is either supported by the JSE 1.1
style API (String.String(byte[], String)), but not the JSE 1.4
style API (Charset.forName(String)), or vice versa.
This implies that this error is not thrown if the character
set is consistently supported or not supported by both APIs!
Most of the time, this error happens when accessing regular ZIP files.
The respective archive drivers require "IBM437" as the
character set.
Unfortunately, this character set is optional and Sun's JSE
implementations usually only install it if the JSE has been fully
installed. Its provider is then located in
$JAVA_HOME/lib/charsets.jar, where $JAVA_HOME is the
path name of the installed JRE.
To ensure that "IBM437" is always available regardless of
the JRE installation, TrueZIP provides its own provider for this charset.
This provider is configured in
truezip.jar/META-INF/services/java.nio.charset.spi.CharsetProvider.
So you should actually never see this happening (cruel world - sigh...).
Because the detected inconsistency would cause subtle bugs in archive
drivers and may affect other applications, too, it needs fixing.
Your options in order of preference:
- Upgrade to a more recent JRE or reinstall it.
When asked during installation, make sure to do a "full install".
- Fix the JRE by copying $JAVA_HOME/lib/charsets.jar from some
other distribution.
This should ensure that $JAVA_HOME/lib/charsets.jar is present in the
JRE, which contains the provider for the "IBM437" character
set.
Although this should not be necessary due to TrueZIP's own provider,
this seems to fix the issue.
This error class has protected visibility solely for the purpose of
documenting it in the Javadoc.
- See Also:
- Serialized Form
| 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
AbstractArchiveDriver.InconsistentCharsetSupportError
private AbstractArchiveDriver.InconsistentCharsetSupportError(String charset,
Exception cause)
message
private static String message(String charset,
Exception cause)
Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.