Top Description Fields Constructors Methods
nu.xom

public Class UnavailableCharacterException

extends XMLException
Class Inheritance

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.

Author
Elliotte Rusty Harold
Version
1.1b3

Field Summary

Modifier and TypeField and Description
private final String
private static final long
private final char

Constructor Summary

AccessConstructor and Description
public
UnavailableCharacterException(char
the character which caused the exception
character
,
String
the encoding which does not contain the character
encoding
)

Creates a new UnavailableCharacterException.

Method Summary

Modifier and TypeMethod and Description
public char

Returns:

the character which caused the exception
getCharacter
()

Returns the character which could not be written in the current encoding.

public String

Returns:

the encoding used by the serializer when the exception was thrown
getEncoding
()

Returns the encoding that does not support the character.

Inherited from nu.xom.XMLException:
getCauseinitCause

Field Detail

encodingback to summary
private final String encoding
serialVersionUIDback to summary
private static final long serialVersionUID

Hides nu.xom.XMLException.serialVersionUID.

unavailableCharacterback to summary
private final char unavailableCharacter

Constructor Detail

UnavailableCharacterExceptionback to summary
public UnavailableCharacterException(char character, String encoding)

Creates a new UnavailableCharacterException.

Parameters
character:char

the character which caused the exception

encoding:String

the encoding which does not contain the character

Method Detail

getCharacterback to summary
public char getCharacter()

Returns the character which could not be written in the current encoding.

Returns:char

the character which caused the exception

getEncodingback to summary
public String getEncoding()

Returns the encoding that does not support the character.

Returns:String

the encoding used by the serializer when the exception was thrown