public interface IEncoder
Important: Each class implementing this interface must have a nullary constructor, so the object can be instantiated using the Class.fromName() methods by the EncoderManager.
| Modifier and Type | Method and Description |
|---|---|
String |
encode(char value,
EncoderContext context)
Encodes a given character with this encoding.
|
String |
encode(int codePoint,
EncoderContext context)
Encodes a given code-point with this encoding.
|
String |
encode(String text,
EncoderContext context)
Encodes a given text with this encoder.
|
CharsetEncoder |
getCharsetEncoder()
Gets the character set encoder used for this encoder.
|
String |
getEncoding()
Gets the name of the charset encoding to use.
|
String |
getLineBreak()
Gets the line-break to use for this encoder.
|
IParameters |
getParameters()
Gets the parameters object with all the configuration information
specific to this encoder.
|
void |
reset()
Reset state in this encoder in preparation for processing new content.
|
void |
setOptions(IParameters params,
String encoding,
String lineBreak)
Sets the options for this encoder.
|
String |
toNative(String propertyName,
String value)
Converts any property values from its standard representation to
the native representation for this encoder.
|
void reset()
void setOptions(IParameters params, String encoding, String lineBreak)
params - the parameters object with all the configuration information
specific to this encoder.encoding - the name of the charset encoding to use.lineBreak - the type of line break to use.String encode(String text, EncoderContext context)
text - the text to encode.context - the context of the text: 0=text, 1=skeleton, 2=inline.String encode(int codePoint, EncoderContext context)
codePoint - the code-point to encode.context - the context of the character: 0=text, 1=skeleton, 2=inline.String encode(char value, EncoderContext context)
value - the character to encode.context - the context of the character: 0=text, 1=skeleton, 2=inline.String toNative(String propertyName, String value)
propertyName - the name of the property.value - the standard value to convert.String getLineBreak()
String getEncoding()
CharsetEncoder getCharsetEncoder()
IParameters getParameters()
Copyright © 2021. All rights reserved.