Class UnicodeUtil
java.lang.Object
org.eclipse.birt.report.model.api.util.UnicodeUtil
The utility class to handle Unicode encoding and signatures.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The signature for the UCS4 Big Endian files.static final String
The signature for the UCS4 Little Endian files.static final String
The signature for the Unicode Big Endian files.static final String
The signature for the Unicode Little Endian files.static final String
The signature for the UTF-8 files. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
checkUTFSignature
(InputStream inputStream) Reads a signature if it applies.
-
Field Details
-
SIGNATURE_UTF_8
The signature for the UTF-8 files.- See Also:
-
SIGNATURE_UNICODE_BIG
The signature for the Unicode Big Endian files.- See Also:
-
SIGNATURE_UNICODE_LITTLE
The signature for the Unicode Little Endian files.- See Also:
-
SIGNATURE_UCS4_BIG
The signature for the UCS4 Big Endian files.- See Also:
-
SIGNATURE_UCS4_LITTLE
The signature for the UCS4 Little Endian files.- See Also:
-
-
Constructor Details
-
UnicodeUtil
public UnicodeUtil()
-
-
Method Details
-
checkUTFSignature
Reads 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:
IOException
- if errors occur when reading bytes from the input stream
-