org.jboss.portal.common.text
Interface CharToByteEncoder
- All Known Implementing Classes:
- CharToByteEncoder.Generic
public interface CharToByteEncoder
Defines an interface for encoding a char to a sequence of bytes.
- Version:
- $Revision: 1.1 $
- Author:
- Julien Viet
Field Summary |
static byte[] |
EMPTY
. |
Method Summary |
byte[] |
encode(char c)
Encode the specified char. |
EMPTY
static final byte[] EMPTY
- .
encode
byte[] encode(char c)
throws EncodingException
- Encode the specified char. The returned byte array can be used safely until a new invocation to the same
object is done. If the returned array has a length of zero it means that the char cannot be encoded.
- Parameters:
c
- the char to encode
- Returns:
- the encoded char as a byte array
- Throws:
EncodingException