public enum CodecUtils extends Enum<CodecUtils>
Modifier and Type | Method and Description |
---|---|
static byte[] |
toBytesDirect(String singleOctets)
Returns a byte array representing the given string,
truncating each character into a byte directly.
|
static String |
toStringDirect(byte[] bytes)
Returns a string representing the given byte array,
treating each byte as a single octet character.
|
static CodecUtils |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CodecUtils[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static CodecUtils[] values()
for (CodecUtils c : CodecUtils.values()) System.out.println(c);
public static CodecUtils 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 static byte[] toBytesDirect(String singleOctets)
IllegalArgumentException
- if the input string contains any multi-octet characterpublic static String toStringDirect(byte[] bytes)
Copyright © 2017. All rights reserved.