|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.io.ByteOrderMark
public class ByteOrderMark
Byte Order Mark (BOM) representation - see BOMInputStream.
BOMInputStream,
Wikipedia: Byte Order Mark,
W3C: Autodetection of Character Encodings
(Non-Normative),
Serialized Form| Field Summary | |
|---|---|
static ByteOrderMark |
UTF_16BE
UTF-16BE BOM (Big-Endian) |
static ByteOrderMark |
UTF_16LE
UTF-16LE BOM (Little-Endian) |
static ByteOrderMark |
UTF_32BE
UFT-32BE BOM (Big-Endian) |
static ByteOrderMark |
UTF_32LE
UTF-32LE BOM (Big-Endian) |
static ByteOrderMark |
UTF_8
UTF-8 BOM |
| Constructor Summary | |
|---|---|
ByteOrderMark(String charsetName,
int... bytes)
Construct a new BOM. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Indicates if this BOM's bytes equals another. |
int |
get(int pos)
The byte at the specified position. |
byte[] |
getBytes()
Return a copy of the BOM's bytes. |
String |
getCharsetName()
Return the name of the Charset the BOM represents. |
int |
hashCode()
Return the hashcode for this BOM. |
int |
length()
Return the length of the BOM's bytes. |
String |
toString()
Provide a String representation of the BOM. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final ByteOrderMark UTF_8
public static final ByteOrderMark UTF_16BE
public static final ByteOrderMark UTF_16LE
public static final ByteOrderMark UTF_32BE
public static final ByteOrderMark UTF_32LE
| Constructor Detail |
|---|
public ByteOrderMark(String charsetName,
int... bytes)
charsetName - The name of the charset the BOM representsbytes - The BOM's bytes
IllegalArgumentException - if the charsetName is null or
zero length
IllegalArgumentException - if the bytes are null or zero
length| Method Detail |
|---|
public String getCharsetName()
Charset the BOM represents.
public int length()
public int get(int pos)
pos - The position
public byte[] getBytes()
public boolean equals(Object obj)
equals in class Objectobj - The object to compare to
public int hashCode()
hashCode in class ObjectObject.hashCode()public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||