org.apache.tapestry.util.text
Class DefaultCharacterTranslatorSource
java.lang.Object
org.apache.tapestry.util.text.DefaultCharacterTranslatorSource
- All Implemented Interfaces:
- ICharacterTranslatorSource
public class DefaultCharacterTranslatorSource
- extends Object
- implements ICharacterTranslatorSource
The default implementation of a character translator source. Returns a
standard HTML translator that encodes everything that is non-safe or an HTML
translator that encodes only non-safe ASCII symbols if the encoding is a
unicode one.
- Since:
- 4.0
- Author:
- mb
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultCharacterTranslatorSource
public DefaultCharacterTranslatorSource()
getDefaultTranslator
public ICharacterTranslator getDefaultTranslator()
- Returns a translator that encodes all non-safe characters into their HTML
equivalents.
- Specified by:
getDefaultTranslator
in interface ICharacterTranslatorSource
- See Also:
ICharacterTranslatorSource.getDefaultTranslator()
getTranslator
public ICharacterTranslator getTranslator(String encoding)
- If the encoding is a Unicode one, returns a translator that encodes only
the non-safe ASCII characters and leaves the others untouched. Otherwise,
returns the default translator.
- Specified by:
getTranslator
in interface ICharacterTranslatorSource
- See Also:
ICharacterTranslatorSource.getTranslator(java.lang.String)
Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.