Class ByteOrderMark

java.lang.Object
org.apache.wicket.util.io.ByteOrderMark
All Implemented Interfaces:
Serializable

public class ByteOrderMark extends Object implements Serializable
Byte Order Mark (BOM) representation - see BOMInputStream.
Since:
2.0
Version:
$Id$
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • getCharsetName

      Return the name of the Charset the BOM represents.
      Returns:
      the character set name
    • length

      public int length()
      Return the length of the BOM's bytes.
      Returns:
      the length of the BOM's bytes
    • get

      public int get(int pos)
      The byte at the specified position.
      Parameters:
      pos - The position
      Returns:
      The specified byte
    • getBytes

      public byte[] getBytes()
      Return a copy of the BOM's bytes.
      Returns:
      a copy of the BOM's bytes
    • equals

      public boolean equals(Object obj)
      Indicates if this BOM's bytes equals another.
      Overrides:
      equals in class Object
      Parameters:
      obj - The object to compare to
      Returns:
      true if the bom's bytes are equal, otherwise false
    • hashCode

      public int hashCode()
      Return the hashcode for this BOM.
      Overrides:
      hashCode in class Object
      Returns:
      the hashcode for this BOM.
      See Also:
    • toString

      public String toString()
      Provide a String representation of the BOM.
      Overrides:
      toString in class Object
      Returns:
      the length of the BOM's bytes