org.codehaus.xsite.extractors
Class CharacterEscaper

java.lang.Object
  extended by org.codehaus.xsite.extractors.CharacterEscaper

public class CharacterEscaper
extends Object

Allows the escaping of characters with HTML entities. The escaped characters are expressed as a Map, linking the the Unicode character to the corresponding HTML entity. By default characters in the ordinal range 192-255 are escaped.

Author:
Mauro Talevi

Constructor Summary
CharacterEscaper()
           
CharacterEscaper(Map<String,String> characters)
           
 
Method Summary
static Map<String,String> defaultEscapedCharacters()
          Returns the escaped characters from ordinal number range 192-255
 String escape(String value)
           
static Map<String,String> escapedCharacters(int from, int to)
          Returns the escaped characters from ordinal number range provided
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CharacterEscaper

public CharacterEscaper()

CharacterEscaper

public CharacterEscaper(Map<String,String> characters)
Method Detail

escape

public String escape(String value)

defaultEscapedCharacters

public static Map<String,String> defaultEscapedCharacters()
Returns the escaped characters from ordinal number range 192-255

Returns:
A Map of escaped characters

escapedCharacters

public static Map<String,String> escapedCharacters(int from,
                                                   int to)
Returns the escaped characters from ordinal number range provided

Returns:
A Map of escaped characters


Copyright © 2012. All Rights Reserved.