Class XMLEncodingSniffer
java.lang.Object
com.adobe.epubcheck.xml.XMLEncodingSniffer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final byte[]private static final byte[][]private static final byte[][]private static final byte[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanChecks if the parameter input stream has a UTF-8 byte order mark.private static booleanmatchesMagic(byte[] magic, byte[] buffer) static String
-
Field Details
-
UTF16_MAGIC
private static final byte[][] UTF16_MAGIC -
UCS4_MAGIC
private static final byte[][] UCS4_MAGIC -
UTF8_MAGIC
private static final byte[] UTF8_MAGIC -
EBCDIC_MAGIC
private static final byte[] EBCDIC_MAGIC
-
-
Constructor Details
-
XMLEncodingSniffer
private XMLEncodingSniffer()
-
-
Method Details
-
matchesMagic
private static boolean matchesMagic(byte[] magic, byte[] buffer) -
sniffEncoding
- Throws:
IOException
-
hasUTF8BOM
Checks if the parameter input stream has a UTF-8 byte order mark.- Parameters:
in- an input stream- Returns:
trueif and only if the input stream starts with a UTF-8 BOM- Throws:
IOException
-