org.enhydra.xml.io
Class ISO8859CharacterSet

java.lang.Object
  |
  +--org.enhydra.xml.io.CharacterSet
        |
        +--org.enhydra.xml.io.ISO8859CharacterSet

class ISO8859CharacterSet
extends CharacterSet

Information and operations associated with the ISO-8859-* group of character sets.


Constructor Summary
ISO8859CharacterSet(java.lang.String name, int charSize, java.lang.String mimePreferred, java.lang.String[] aliases)
          Constructor
 
Method Summary
 java.lang.String[] getAliases()
          Get the aliases
 int getCharSize()
          Get the character size, in bits
 int getMaxCharValue()
          Get the maximum value for a character
 java.lang.String getMIMEPreferred()
          Get the MIME preferred name or null if unspecified
 java.lang.String getName()
          Get the name
 boolean isCompatible(CharacterSet otherSet)
          Determine if another character set is compatible to this character set.
 boolean isValid(char ch)
          Basic implementation for ISO 8859 character sets.
 boolean sameValidCharRange(CharacterSet otherSet)
          Determine if another character set has the same valid range of character codes as this character set.
 java.lang.String toString()
          Get string representation of object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ISO8859CharacterSet

public ISO8859CharacterSet(java.lang.String name,
                           int charSize,
                           java.lang.String mimePreferred,
                           java.lang.String[] aliases)
Constructor

Method Detail

isValid

public boolean isValid(char ch)
Basic implementation for ISO 8859 character sets. Considers all characters in the range of 0x0081 through 0x0099 to be invalid. Note: Acdcording to the specs, these characters are valid. But they are control characters and rarely ever used on purpose. In most cases, these characters are encountered by confusing the Windows CP 1252 character set with ISO-8859-1.

Overrides:
isValid in class CharacterSet
See Also:
CharacterSet.isValid

sameValidCharRange

public boolean sameValidCharRange(CharacterSet otherSet)
Description copied from class: CharacterSet
Determine if another character set has the same valid range of character codes as this character set. That is, will isValid() return the same value for any arbitrary unicode character.

WARNING: This is only well implemented for a few character sets on an as-needed basis; the rest just go by the character size.

Overrides:
sameValidCharRange in class CharacterSet
See Also:
CharacterSet.isCompatible

getName

public final java.lang.String getName()
Get the name


getCharSize

public final int getCharSize()
Get the character size, in bits


getMaxCharValue

public final int getMaxCharValue()
Get the maximum value for a character


getMIMEPreferred

public final java.lang.String getMIMEPreferred()
Get the MIME preferred name or null if unspecified


getAliases

public final java.lang.String[] getAliases()
Get the aliases


isCompatible

public boolean isCompatible(CharacterSet otherSet)
Determine if another character set is compatible to this character set. "Compatible" means that for every character where otherSet.isValid() return true, this.isValid() will return true as well.

WARNING: This is only well implemented for a few character sets on an as-needed basis; the rest just go by the character set size.


toString

public java.lang.String toString()
Get string representation of object

Overrides:
toString in class java.lang.Object


Copyright © 1999-2002 enhydra.org (Mark Diekhans, David Li, Richard Kunze). All Rights reserved.