org.exoplatform.commons.utils
Class CharsetCharEncoder
java.lang.Object
org.exoplatform.commons.utils.CharsetCharEncoder
- All Implemented Interfaces:
- CharEncoder
public class CharsetCharEncoder
- extends Object
- implements CharEncoder
An implementation of a char encoder that is stateless and is based on a specified charset.
- Version:
- $Revision$
- Author:
- Julien Viet
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CharsetCharEncoder
public CharsetCharEncoder(Charset charset)
getUTF8
public static CharEncoder getUTF8()
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.