org.exoplatform.commons.utils
Class TableCharEncoder
java.lang.Object
org.exoplatform.commons.utils.TableCharEncoder
- All Implemented Interfaces:
- CharEncoder
public class TableCharEncoder
- extends Object
- implements CharEncoder
A char encoder that use a table to cache the result produced by a delegate char encoder. This encoder
is stateless and should only be composed with stateless char encoder otherwise an unexpected result
may happen.
- Version:
- $Revision$
- Author:
- Julien Viet
|
Method Summary |
byte[] |
encode(char c)
Encodes a single char into an array of bytes. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TableCharEncoder
public TableCharEncoder(CharEncoder charEncoder)
- Creates a new table based char encoder.
- Parameters:
charEncoder - the delegate char encoder
encode
public byte[] encode(char c)
- Description copied from interface:
CharEncoder
- Encodes a single char into an array of bytes. The returned array of bytes should not be modified.
- Specified by:
encode in interface CharEncoder
- Parameters:
c - the char to encode
- Returns:
- the serie of bytes corresponding to the encoded char
Copyright © 2009 eXo Platform SAS. All Rights Reserved.