public final class Util extends Object
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static String |
convertFromUTF8(byte[] buf,
int offset,
int utfSize) |
static String |
convertUTF8WithBuf(byte[] buf,
char[] out,
int offset,
int utfSize) |
static String |
decode(String s,
boolean convertPlus)
'%' and two following hex digit characters are converted to the
equivalent byte value.
|
static byte[] |
getBytes(String name)
Get bytes from String using default encoding; default encoding can
be changed via "os.encoding" property
|
static byte[] |
getUTF8Bytes(String name)
Get bytes from String with UTF8 encoding
|
static long |
parseDate(String string)
Answers the millisecond value of the date and time parsed from the
specified String.
|
static String |
toASCIILowerCase(String s) |
static String |
toASCIIUpperCase(String s) |
static String |
toString(byte[] bytes) |
static String |
toString(byte[] bytes,
int offset,
int length) |
static String |
toUTF8String(byte[] bytes) |
static String |
toUTF8String(byte[] bytes,
int offset,
int length) |
public static byte[] getBytes(String name)
name
- input Stringpublic static byte[] getUTF8Bytes(String name)
name
- input Stringpublic static String toString(byte[] bytes)
public static String toUTF8String(byte[] bytes)
public static String toString(byte[] bytes, int offset, int length)
public static String toUTF8String(byte[] bytes, int offset, int length)
public static long parseDate(String string)
string
- the String to parsepublic static String convertFromUTF8(byte[] buf, int offset, int utfSize) throws UTFDataFormatException
UTFDataFormatException
public static String convertUTF8WithBuf(byte[] buf, char[] out, int offset, int utfSize) throws UTFDataFormatException
UTFDataFormatException
public static String decode(String s, boolean convertPlus)
s
- java.lang.String The encoded string.