## org.eclipse.emf.ecore.resource
Enum ContentHandler.ByteOrderMark

    java.lang.Object
      java.lang.Enum<ContentHandler.ByteOrderMark>
          org.eclipse.emf.ecore.resource.ContentHandler.ByteOrderMark

All Implemented Interfaces:
  java.io.Serializable, java.lang.Comparable<ContentHandler.ByteOrderMark>

Enclosing interface:
  ContentHandler

    public static enum ContentHandler.ByteOrderMark

extends java.lang.Enum<ContentHandler.ByteOrderMark>

A value specifying the byte order mark of a `content description`. The `byte order mark property` will have a value of this type, i.., either `UTF_8`, `UTF_16BE`, or `UTF_16LE`.

See Also:
  `IContentDescription.BYTE_ORDER_MARK`, `IContentDescription.BOM_UTF_8`, `IContentDescription.BOM_UTF_16BE`, `IContentDescription.BOM_UTF_16LE`

Enum Constant Summary
`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.

Method Summary
`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're declared.

Methods inherited from class java.lang.Enum
`clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Enum Constant Detail

### UTF_8

    public static final ContentHandler.ByteOrderMark UTF_8

  A byte order mark indicating a UTF-8 encoding.

  See Also:
    `IContentDescription.BOM_UTF_8`

### UTF_16BE

    public static final ContentHandler.ByteOrderMark UTF_16BE

  A byte order mark indicating a UTF-16 big endian encoding.

  See Also:
    `IContentDescription.BOM_UTF_16BE`

### UTF_16LE

    public static final ContentHandler.ByteOrderMark UTF_16LE

  A byte order mark indicating a UTF-16 little endian encoding.

  See Also:
    `IContentDescription.BOM_UTF_16LE`

Method Detail

### values

    public static final ContentHandler.ByteOrderMark[] values()

  Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:

      for(ContentHandler.ByteOrderMark c : ContentHandler.ByteOrderMark.values())
              System.out.println(c);

  Returns:
    an array containing the constants of this enum type, in the order they're declared

### valueOf

    public static ContentHandler.ByteOrderMark valueOf(java.lang.String name)

  Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

  Parameters:
    `name` - the name of the enum constant to be returned.
  Returns:
    the enum constant with the specified name
  Throws:
    `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name

### bytes

    public abstract byte[] bytes()

  Returns the bytes associated with this byte order mark. This value will be identical to the corresponding constant for `IContentDescription.BYTE_ORDER_MARK`.

  Returns:
    the bytes associated with this byte order mark.
  See Also:
    `IContentDescription.BYTE_ORDER_MARK`, `IContentDescription.BOM_UTF_8`, `IContentDescription.BOM_UTF_16BE`, `IContentDescription.BOM_UTF_16LE`

### read

    public static ContentHandler.ByteOrderMark read(java.io.InputStream inputStream)
                                             throws java.io.IOException

  Returns the byte order mark at the start of the input stream, or `null` if there isn't one.

  Parameters:
    `inputStream` - the input stream to scan.
  Returns:
    the byte order mark at the start of the input stream, or `null` if there isn't one.
  Throws:
    `java.io.IOException` - if there is a problem reading from the input stream.

Copyright 2001-2006 IBM Corporation and others. All Rights Reserved.