public class ConversionUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
NATIVE_UTF16_CHARSET_NAME |
static String |
TEST_UNICODE_SQL_ESCAPED_LITERAL
A constant string which can be used wherever a SQL literal containing
Unicode escape characters is needed in a test.
|
static String |
TEST_UNICODE_STRING
A constant string which can be used wherever a Java string containing
Unicode characters is needed in a test.
|
| Modifier and Type | Method and Description |
|---|---|
static Boolean |
toBoolean(String str)
Converts a string into a boolean
|
static byte[] |
toByteArrayFromString(String value,
int radix)
Converts a string into a byte array.
|
static String |
toStringFromApprox(double d,
boolean isFloat)
Converts an approximate value into a string, following the SQL 2003
standard.
|
static String |
toStringFromByteArray(byte[] value,
int radix)
Converts a byte array into a bit string or a hex string.
|
public static final String NATIVE_UTF16_CHARSET_NAME
public static final String TEST_UNICODE_STRING
public static final String TEST_UNICODE_SQL_ESCAPED_LITERAL
public static String toStringFromByteArray(byte[] value, int radix)
For example, toStringFromByteArray(new byte[] {0xAB, 0xCD},
16) returns ABCD.
public static byte[] toByteArrayFromString(String value, int radix)
toStringFromByteArray(byte[], int).public static String toStringFromApprox(double d, boolean isFloat)
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.