| java.lang.Object com.ibm.icu.impl.UTF32
UTF32 | abstract public class UTF32 (Code) | | This class converts between an array of bytes in UTF-32 encoding (BE or LE) and
Java Strings.
|
Inner Class :static class BE extends UTF32 | |
Inner Class :static class LE extends UTF32 | |
Method Summary | |
public String | fromBytes(byte[] bytes, int offset, int count) This method converts a sequence of UTF-32 encoded bytes into
a Java String. | public String | fromBytes(byte[] bytes) A convenience method that converts an entire byte array
into a Java String.
Parameters: bytes - the source byte array. | public static UTF32 | getBEInstance() Get an instance that implements UTF-32BE encoding. | public static UTF32 | getInstance(String encoding) Get an instance that implements either UTF-32BE or UTF32-LE,
depending on the encoding name suppled.
Parameters: encoding - the encoding name - must be "UTF-32BE" or "UTF-32LE" . | public static UTF32 | getLEInstance() Get an instance that implemnts the UTF-32LE encoding. | abstract protected void | pack(byte[] bytes, int codePoint, int out) This method packs a 32-bit Unicode code point into the byte array. | public byte[] | toBytes(String utf16) Convert a Java String into an array of UTF-32 encoded bytes. | abstract protected int | unpack(byte[] bytes, int index) This method unpacks bytes from the encoded byte array into a 32-bit
Unicode code point. |
fromBytes | public String fromBytes(byte[] bytes, int offset, int count)(Code) | | This method converts a sequence of UTF-32 encoded bytes into
a Java String. It calls the unpack method to implement
the encoding.
Parameters: bytes - the source byte array. Parameters: offset - the starting offset in the byte array. Parameters: count - the number of bytes to process. the Java String. |
fromBytes | public String fromBytes(byte[] bytes)(Code) | | A convenience method that converts an entire byte array
into a Java String.
Parameters: bytes - the source byte array. the Java String. |
getBEInstance | public static UTF32 getBEInstance()(Code) | | Get an instance that implements UTF-32BE encoding.
the instance. |
getInstance | public static UTF32 getInstance(String encoding)(Code) | | Get an instance that implements either UTF-32BE or UTF32-LE,
depending on the encoding name suppled.
Parameters: encoding - the encoding name - must be "UTF-32BE" or "UTF-32LE" . the instance. |
getLEInstance | public static UTF32 getLEInstance()(Code) | | Get an instance that implemnts the UTF-32LE encoding.
the instance. |
pack | abstract protected void pack(byte[] bytes, int codePoint, int out)(Code) | | This method packs a 32-bit Unicode code point into the byte array. It is
implemented by subclasses that implement the BE and LE encodings.
Parameters: bytes - the destination byte array Parameters: codePoint - the 32-bit Unicode code point Parameters: out - the destination index in bytes . |
toBytes | public byte[] toBytes(String utf16)(Code) | | Convert a Java String into an array of UTF-32 encoded bytes. Calls
the pack method to do the encoding.
Parameters: utf16 - the source Java String. an array of UTF-32 encoded bytes. |
unpack | abstract protected int unpack(byte[] bytes, int index)(Code) | | This method unpacks bytes from the encoded byte array into a 32-bit
Unicode code point. It is implmeented by subclasses that implmeent the BE and LE encodings.
Parameters: bytes - the source byte array. Parameters: index - the index of the first source byte. the 32-bit Unicode code point. |
|
|