public class UtfUtil
extends java.lang.Object
UtfUtil
MagicNumber
MagicMimeTypeIdentifier
MagicString
MagicNumber
Modifier and Type | Field and Description |
---|---|
static int |
MAX_BOM_LENGTH |
static byte[] |
UTF16BE_BOM |
static byte[] |
UTF16LE_BOM |
static byte[] |
UTF32BE_BOM |
static byte[] |
UTF32LE_BOM |
static byte[] |
UTF8_BOM |
Constructor and Description |
---|
UtfUtil() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
findMatchingBOM(byte[] bytes)
Determines whether the specified byte array starts with a UTF Byte Order Mark and, if so, returns the
matching BOM constant.
|
static java.lang.String |
getCharsetName(byte[] byteOrderMark)
Returns the canonical charset name consistent with the specified Byte Order Mark.
|
public static final byte[] UTF8_BOM
public static final byte[] UTF16BE_BOM
public static final byte[] UTF16LE_BOM
public static final byte[] UTF32BE_BOM
public static final byte[] UTF32LE_BOM
public static final int MAX_BOM_LENGTH
public static byte[] findMatchingBOM(byte[] bytes)
bytes
- The byte array that is tested for the presence of a UTF Byte Order Mark.public static java.lang.String getCharsetName(byte[] byteOrderMark)
byteOrderMark
- A Unicode Byte Order Mark.Copyright © 2001-2017 Jalios SA. All Rights Reserved.