org.springframework.web.util
Class HtmlCharacterEntityReferences

java.lang.Object
  extended by org.springframework.web.util.HtmlCharacterEntityReferences

 class HtmlCharacterEntityReferences
extends Object

Represents a set of character entity references defined by the HTML 4.0 standard.

A complete description of the HTML 4.0 character set can be found at http://www.w3.org/TR/html4/charset.html.

Since:
1.2.1
Author:
Juergen Hoeller, Martin Kersten

Field Summary
(package private) static char CHAR_NULL
           
(package private) static String DECIMAL_REFERENCE_START
           
(package private) static String HEX_REFERENCE_START
           
(package private) static char REFERENCE_END
           
(package private) static char REFERENCE_START
           
 
Constructor Summary
HtmlCharacterEntityReferences()
          Returns a new set of character entity references reflecting the HTML 4.0 character set.
 
Method Summary
 char convertToCharacter(String entityReference)
          Return the char mapped to the given entityReference or -1.
 String convertToReference(char character)
          Return the reference mapped to the given character or null.
 int getSupportedReferenceCount()
          Return the number of supported entity references.
 boolean isMappedToReference(char character)
          Return true if the given character is mapped to a supported entity reference.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REFERENCE_START

static final char REFERENCE_START
See Also:
Constant Field Values

DECIMAL_REFERENCE_START

static final String DECIMAL_REFERENCE_START
See Also:
Constant Field Values

HEX_REFERENCE_START

static final String HEX_REFERENCE_START
See Also:
Constant Field Values

REFERENCE_END

static final char REFERENCE_END
See Also:
Constant Field Values

CHAR_NULL

static final char CHAR_NULL
See Also:
Constant Field Values
Constructor Detail

HtmlCharacterEntityReferences

public HtmlCharacterEntityReferences()
Returns a new set of character entity references reflecting the HTML 4.0 character set.

Method Detail

getSupportedReferenceCount

public int getSupportedReferenceCount()
Return the number of supported entity references.


isMappedToReference

public boolean isMappedToReference(char character)
Return true if the given character is mapped to a supported entity reference.


convertToReference

public String convertToReference(char character)
Return the reference mapped to the given character or null.


convertToCharacter

public char convertToCharacter(String entityReference)
Return the char mapped to the given entityReference or -1.



Copyright (c) 2002-2006 The Spring Framework Project.