Package org.mozilla.universalchardet
Class UnicodeBOMInputStream.BOM
- java.lang.Object
-
- org.mozilla.universalchardet.UnicodeBOMInputStream.BOM
-
- Enclosing class:
- UnicodeBOMInputStream
public static final class UnicodeBOMInputStream.BOM extends java.lang.Object
Type safe enumeration class that describes the different types of Unicode BOMs.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) byte[]
bytes
private java.lang.String
description
static UnicodeBOMInputStream.BOM
NONE
NONE.static UnicodeBOMInputStream.BOM
UTF_16_BE
UTF-16, big-endian (FE FF).static UnicodeBOMInputStream.BOM
UTF_16_LE
UTF-16, little-endian (FF FE).static UnicodeBOMInputStream.BOM
UTF_32_BE
UTF-32, big-endian (00 00 FE FF).static UnicodeBOMInputStream.BOM
UTF_32_LE
UTF-32, little-endian (FF FE 00 00).static UnicodeBOMInputStream.BOM
UTF_8
UTF-8 BOM (EF BB BF).
-
Constructor Summary
Constructors Modifier Constructor Description private
BOM(byte[] bom, java.lang.String description)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getBytes()
Returns the bytes corresponding to thisBOM
value.java.lang.String
toString()
Returns aString
representation of thisBOM
value.
-
-
-
Field Detail
-
bytes
final byte[] bytes
-
description
private final java.lang.String description
-
NONE
public static final UnicodeBOMInputStream.BOM NONE
NONE.
-
UTF_8
public static final UnicodeBOMInputStream.BOM UTF_8
UTF-8 BOM (EF BB BF).
-
UTF_16_LE
public static final UnicodeBOMInputStream.BOM UTF_16_LE
UTF-16, little-endian (FF FE).
-
UTF_16_BE
public static final UnicodeBOMInputStream.BOM UTF_16_BE
UTF-16, big-endian (FE FF).
-
UTF_32_LE
public static final UnicodeBOMInputStream.BOM UTF_32_LE
UTF-32, little-endian (FF FE 00 00).
-
UTF_32_BE
public static final UnicodeBOMInputStream.BOM UTF_32_BE
UTF-32, big-endian (00 00 FE FF).
-
-
Method Detail
-
toString
public final java.lang.String toString()
Returns aString
representation of thisBOM
value.- Overrides:
toString
in classjava.lang.Object
-
getBytes
public final byte[] getBytes()
Returns the bytes corresponding to thisBOM
value.- Returns:
- the bytes corresponding to this
BOM
value.
-
-