public enum EncodingType extends Enum<EncodingType>
Enum Constant and Description |
---|
DOUBLE_BIG_ENDIAN |
DOUBLE_LITTLE_ENDIAN |
SINGLE |
Modifier and Type | Method and Description |
---|---|
int |
getBom() |
byte[] |
getBytes(String string,
String encoding) |
int |
getCarriageReturnChar() |
int |
getLength() |
int |
getLineFeedChar() |
static EncodingType |
guessEncodingType(String encoding) |
boolean |
isLinefeed(int c) |
boolean |
isReturn(int c) |
static EncodingType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EncodingType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EncodingType SINGLE
public static final EncodingType DOUBLE_BIG_ENDIAN
public static final EncodingType DOUBLE_LITTLE_ENDIAN
public static EncodingType[] values()
for (EncodingType c : EncodingType.values()) System.out.println(c);
public static EncodingType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getLength()
public int getBom()
public int getCarriageReturnChar()
public int getLineFeedChar()
public boolean isReturn(int c)
public boolean isLinefeed(int c)
public static EncodingType guessEncodingType(String encoding)
public byte[] getBytes(String string, String encoding) throws UnsupportedEncodingException
UnsupportedEncodingException