Package nu.xom
Class UnavailableCharacterException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
nu.xom.XMLException
nu.xom.UnavailableCharacterException
- All Implemented Interfaces:
Serializable
Thrown when serializing documents that contain characters not available in the current encoding, and which cannot be escaped (for instance, because they're in an element name or processing instruction data). This can never happen if the encoding is UTF-8 or UTF-16.
- Version:
- 1.1b3
- Author:
- Elliotte Rusty Harold
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionUnavailableCharacterException
(char character, String encoding) Creates a newUnavailableCharacterException
. -
Method Summary
Modifier and TypeMethodDescriptionchar
Returns the character which could not be written in the current encoding.Returns the encoding that does not support the character.Methods inherited from class nu.xom.XMLException
getCause, initCause
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
UnavailableCharacterException
Creates a new
UnavailableCharacterException
.- Parameters:
character
- the character which caused the exceptionencoding
- the encoding which does not contain the character
-
-
Method Details
-
getCharacter
public char getCharacter()Returns the character which could not be written in the current encoding.
- Returns:
- the character which caused the exception
-
getEncoding
Returns the encoding that does not support the character.
- Returns:
- the encoding used by the serializer when the exception was thrown
-