net.sf.saxon.serialize.charcode
Class JavaCharacterSet

java.lang.Object
  extended by net.sf.saxon.serialize.charcode.JavaCharacterSet
All Implemented Interfaces:
CharacterSet

public class JavaCharacterSet
extends Object
implements CharacterSet

This class establishes properties of a character set that is known to the Java VM but not specifically known to Saxon. It determines whether particular characters are encodable by calling CharsetEncoder.canEncode(char), and then caches this information locally.


Field Summary
static HashMap<Charset,JavaCharacterSet> map
           
 
Method Summary
 String getCanonicalName()
          Get the preferred Java name of the character set.
 boolean inCharset(int c)
          Determine if a character is present in the character set
static JavaCharacterSet makeCharSet(Charset charset)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

map

public static HashMap<Charset,JavaCharacterSet> map
Method Detail

makeCharSet

public static JavaCharacterSet makeCharSet(Charset charset)

inCharset

public final boolean inCharset(int c)
Description copied from interface: CharacterSet
Determine if a character is present in the character set

Specified by:
inCharset in interface CharacterSet

getCanonicalName

public String getCanonicalName()
Description copied from interface: CharacterSet
Get the preferred Java name of the character set. Note that Java in many cases also supports a "historic name".

Specified by:
getCanonicalName in interface CharacterSet


Copyright (c) 2004-2010 Saxonica Limited. All rights reserved.