Class ByteOrderMarkReader
java.lang.Object
com.dd.plist.ByteOrderMarkReader
Reads Byte Order Marks for various Unicode encodings.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
BOMs
private static final int[][] BOMs -
Charsets
-
charsetPossible
private final boolean[] charsetPossible -
offset
private int offset -
charset
-
-
Constructor Details
-
ByteOrderMarkReader
ByteOrderMarkReader()
-
-
Method Details
-
getDetectedCharset
Gets the charset that was detected.- Returns:
- The name of the detected charset, or
null if no charset was detected.
-
readByte
public boolean readByte(int b) Processes a byte that was read from the input.- Parameters:
b- The byte to process.- Returns:
true if the input so far could potentially be a BOM; otherwise,false .
-
detect
Detects the encoding of input data that is available as a complete byte array.- Parameters:
bytes- The input data.- Returns:
- The name of the detected charset, or
null if no BOM was detected.
-