Class UnicodeUtil
- java.lang.Object
-
- org.eclipse.birt.report.model.api.util.UnicodeUtil
-
public class UnicodeUtil extends java.lang.ObjectThe utility class to handle Unicode encoding and signatures.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSIGNATURE_UCS4_BIGThe signature for the UCS4 Big Endian files.static java.lang.StringSIGNATURE_UCS4_LITTLEThe signature for the UCS4 Little Endian files.static java.lang.StringSIGNATURE_UNICODE_BIGThe signature for the Unicode Big Endian files.static java.lang.StringSIGNATURE_UNICODE_LITTLEThe signature for the Unicode Little Endian files.static java.lang.StringSIGNATURE_UTF_8The signature for the UTF-8 files.
-
Constructor Summary
Constructors Constructor Description UnicodeUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringcheckUTFSignature(java.io.InputStream inputStream)Reads a signature if it applies.
-
-
-
Field Detail
-
SIGNATURE_UTF_8
public static final java.lang.String SIGNATURE_UTF_8
The signature for the UTF-8 files.- See Also:
- Constant Field Values
-
SIGNATURE_UNICODE_BIG
public static final java.lang.String SIGNATURE_UNICODE_BIG
The signature for the Unicode Big Endian files.- See Also:
- Constant Field Values
-
SIGNATURE_UNICODE_LITTLE
public static final java.lang.String SIGNATURE_UNICODE_LITTLE
The signature for the Unicode Little Endian files.- See Also:
- Constant Field Values
-
SIGNATURE_UCS4_BIG
public static final java.lang.String SIGNATURE_UCS4_BIG
The signature for the UCS4 Big Endian files.- See Also:
- Constant Field Values
-
SIGNATURE_UCS4_LITTLE
public static final java.lang.String SIGNATURE_UCS4_LITTLE
The signature for the UCS4 Little Endian files.- See Also:
- Constant Field Values
-
-
Method Detail
-
checkUTFSignature
public static java.lang.String checkUTFSignature(java.io.InputStream inputStream) throws java.io.IOExceptionReads a signature if it applies. Currently BIRT can recognize the following signatures:- SIGNATURE_UTF_8
- SIGNATURE_UNICODE_BIG
- SIGNATURE_UNICODE_LITTLE
- SIGNATURE_UCS4_BIG_8
- SIGNATURE_UCS4_LITTLE
- Parameters:
inputStream- the input stream of the unicode file- Returns:
- the encoding signature from the unicode file.
- Throws:
java.io.IOException- if errors occur when reading bytes from the input stream
-
-