|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eigenbase.util14.ConversionUtil
public class ConversionUtil
Utility functions for converting from one type to another
Field Summary | |
---|---|
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. |
Constructor Summary | |
---|---|
ConversionUtil()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String NATIVE_UTF16_CHARSET_NAME
public static final String TEST_UNICODE_STRING
public static final String TEST_UNICODE_SQL_ESCAPED_LITERAL
Constructor Detail |
---|
public ConversionUtil()
Method Detail |
---|
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)
public static Boolean toBoolean(String str)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |