Package org.exoplatform.commons.utils
Class CharsetTextEncoder
java.lang.Object
org.exoplatform.commons.utils.CharsetTextEncoder
- All Implemented Interfaces:
TextEncoder
A stateless encoder that use a char encoder for performing the encoding task.
-
Constructor Summary
ConstructorsConstructorDescriptionCharsetTextEncoder(String encoding) CharsetTextEncoder(CharEncoder charEncoder) -
Method Summary
Modifier and TypeMethodDescriptionvoidencode(char[] chars, int off, int len, OutputStream out) voidencode(char c, OutputStream out) voidencode(String str, int off, int len, OutputStream out) Returns the charset that will perform the encoding.static TextEncodergetUTF8()
-
Constructor Details
-
CharsetTextEncoder
-
CharsetTextEncoder
-
-
Method Details
-
getUTF8
-
getCharset
Description copied from interface:TextEncoderReturns the charset that will perform the encoding.- Specified by:
getCharsetin interfaceTextEncoder- Returns:
- the charset for encoding
-
encode
- Specified by:
encodein interfaceTextEncoder- Throws:
IOException
-
encode
- Specified by:
encodein interfaceTextEncoder- Throws:
IOException
-
encode
- Specified by:
encodein interfaceTextEncoder- Throws:
IOException
-