public static enum ContentHandler.ByteOrderMark extends java.lang.Enum<ContentHandler.ByteOrderMark>
content description
.
The byte order mark property
will have a value of this type,
i.., either UTF_8
, UTF_16BE
, or UTF_16LE
.IContentDescription#BYTE_ORDER_MARK
,
IContentDescription#BOM_UTF_8
,
IContentDescription#BOM_UTF_16BE
,
IContentDescription#BOM_UTF_16LE
Enum Constant and Description |
---|
UTF_16BE
A byte order mark indicating a UTF-16 big endian encoding.
|
UTF_16LE
A byte order mark indicating a UTF-16 little endian encoding.
|
UTF_8
A byte order mark indicating a UTF-8 encoding.
|
Modifier and Type | Method and Description |
---|---|
abstract byte[] |
bytes()
Returns the bytes associated with this byte order mark.
|
static ContentHandler.ByteOrderMark |
read(java.io.InputStream inputStream)
Returns the byte order mark at the start of the input stream, or
null if there isn't one. |
static ContentHandler.ByteOrderMark |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ContentHandler.ByteOrderMark[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ContentHandler.ByteOrderMark UTF_8
IContentDescription#BOM_UTF_8
public static final ContentHandler.ByteOrderMark UTF_16BE
IContentDescription#BOM_UTF_16BE
public static final ContentHandler.ByteOrderMark UTF_16LE
IContentDescription#BOM_UTF_16LE
public static ContentHandler.ByteOrderMark[] values()
for (ContentHandler.ByteOrderMark c : ContentHandler.ByteOrderMark.values()) System.out.println(c);
public static ContentHandler.ByteOrderMark valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namejava.lang.NullPointerException
- if the argument is nullpublic abstract byte[] bytes()
IContentDescription#BYTE_ORDER_MARK
.IContentDescription#BYTE_ORDER_MARK
,
IContentDescription#BOM_UTF_8
,
IContentDescription#BOM_UTF_16BE
,
IContentDescription#BOM_UTF_16LE
public static ContentHandler.ByteOrderMark read(java.io.InputStream inputStream) throws java.io.IOException
null
if there isn't one.inputStream
- the input stream to scan.null
if there isn't one.java.io.IOException
- if there is a problem reading from the input stream.