Package net.sf.okapi.common.encoder
Class BypassEncoder
- java.lang.Object
-
- net.sf.okapi.common.encoder.BypassEncoder
-
-
Constructor Summary
Constructors Constructor Description BypassEncoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringencode(char value, EncoderContext context)Encodes a given character with this encoding.Stringencode(int codePoint, EncoderContext context)Encodes a given code-point with this encoding.Stringencode(String text, EncoderContext context)Encodes a given text with this encoder.IParametersgetParameters()Gets the parameters object with all the configuration information specific to this encoder.voidreset()Reset state in this encoder in preparation for processing new content.voidsetOptions(IParameters params, String encoding, String lineBreak)Sets the options for this encoder.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.okapi.common.encoder.IEncoder
apply, getCharsetEncoder, getEncoding, getLineBreak, toNative
-
-
-
-
Method Detail
-
reset
public void reset()
Description copied from interface:IEncoderReset state in this encoder in preparation for processing new content.
-
setOptions
public void setOptions(IParameters params, String encoding, String lineBreak)
Description copied from interface:IEncoderSets the options for this encoder.- Specified by:
setOptionsin interfaceIEncoder- Parameters:
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.
-
encode
public String encode(String text, EncoderContext context)
Description copied from interface:IEncoderEncodes a given text with this encoder.
-
encode
public String encode(int codePoint, EncoderContext context)
Description copied from interface:IEncoderEncodes a given code-point with this encoding. If this method is called from a loop it is assumed that the code point is tested by the caller to know if it is a supplemental one or not and and any index update to skip the low surrogate part of the pair is done on the caller side.
-
encode
public String encode(char value, EncoderContext context)
Description copied from interface:IEncoderEncodes a given character with this encoding.
-
getParameters
public IParameters getParameters()
Description copied from interface:IEncoderGets the parameters object with all the configuration information specific to this encoder.- Specified by:
getParametersin interfaceIEncoder- Returns:
- the parameters object used for this encoder. This can be null.
-
-