nu.xom

Class UnavailableCharacterException

Object
  extended by Throwable
      extended by Exception
          extended by RuntimeException
              extended by nu.xom.XMLException
                  extended by nu.xom.UnavailableCharacterException
All Implemented Interfaces:
Serializable

public class UnavailableCharacterException
extends XMLException

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:
Serialized Form

Constructor Summary
UnavailableCharacterException(char character, String encoding)

           Creates a new UnavailableCharacterException.
 
Method Summary
 chargetCharacter()

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

           Returns the encoding that does not support the character.
 
Methods inherited from class nu.xom.XMLException
getCause, initCause
 
Methods inherited from class Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnavailableCharacterException

public UnavailableCharacterException(char character,
                                     String encoding)

Creates a new UnavailableCharacterException.

Parameters:
character - the character which caused the exception
encoding - the encoding which does not contain the character
Method Detail

getCharacter

public char getCharacter()

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

Returns:
the character which caused the exception

getEncoding

public String getEncoding()

Returns the encoding that does not support the character.

Returns:
the encoding used by the serializer when the exception was thrown


Copyright 2002-2010 Elliotte Rusty Harold

elharo@ibiblio.org