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.ObjectType safe enumeration class that describes the different types of Unicode BOMs.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) byte[]bytesprivate java.lang.Stringdescriptionstatic UnicodeBOMInputStream.BOMNONENONE.static UnicodeBOMInputStream.BOMUTF_16_BEUTF-16, big-endian (FE FF).static UnicodeBOMInputStream.BOMUTF_16_LEUTF-16, little-endian (FF FE).static UnicodeBOMInputStream.BOMUTF_32_BEUTF-32, big-endian (00 00 FE FF).static UnicodeBOMInputStream.BOMUTF_32_LEUTF-32, little-endian (FF FE 00 00).static UnicodeBOMInputStream.BOMUTF_8UTF-8 BOM (EF BB BF).
-
Constructor Summary
Constructors Modifier Constructor Description privateBOM(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 thisBOMvalue.java.lang.StringtoString()Returns aStringrepresentation of thisBOMvalue.
-
-
-
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 aStringrepresentation of thisBOMvalue.- Overrides:
toStringin classjava.lang.Object
-
getBytes
public final byte[] getBytes()
Returns the bytes corresponding to thisBOMvalue.- Returns:
- the bytes corresponding to this
BOMvalue.
-
-