Package com.itextpdf.io.font
Interface IExtraEncoding
public interface IExtraEncoding
Classes implementing this interface can create custom encodings or replace existing ones. It is used in the context of
PdfEncoding.
-
Method Summary
Modifier and TypeMethodDescriptionbyteToChar(byte[] b, String encoding) Converts a byte array to an Unicode string according to some encoding.byte[]charToByte(char char1, String encoding) Converts an Unicode char to a byte array according to some encoding.byte[]charToByte(String text, String encoding) Converts an Unicode string to a byte array according to some encoding.
-
Method Details
-
charToByte
Converts an Unicode string to a byte array according to some encoding.- Parameters:
-
text- the Unicode string -
encoding- the requested encoding. It's mainly of use if the same class supports more than one encoding. - Returns:
-
the conversion or
nullif no conversion is supported
-
charToByte
Converts an Unicode char to a byte array according to some encoding.- Parameters:
-
char1- the Unicode char -
encoding- the requested encoding. It's mainly of use if the same class supports more than one encoding. - Returns:
-
the conversion or
nullif no conversion is supported
-
byteToChar
Converts a byte array to an Unicode string according to some encoding.- Parameters:
-
b- the input byte array -
encoding- the requested encoding. It's mainly of use if the same class supports more than one encoding. - Returns:
-
the conversion or
nullif no conversion is supported
-