public class ConverterUtils extends Object
| Constructor and Description |
|---|
ConverterUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
toBoolean(byte[] bytes)
Converts the given bytes to boolean.
|
static Boolean |
toBooleanObject(byte[] bytes)
Converts the given bytes to Boolean.
|
static byte |
toByte(byte[] bytes)
Converts the given bytes to byte.
|
static Byte |
toByteObject(byte[] bytes)
Converts the given bytes to Byte.
|
static byte[] |
toBytes(boolean param)
Converts the given parameter to its byte representation.
|
static byte[] |
toBytes(Boolean param)
Converts the given parameter to its byte representation.
|
static byte[] |
toBytes(byte param)
Converts the given parameter to its byte representation.
|
static byte[] |
toBytes(Byte param)
Converts the given parameter to its byte representation.
|
static byte[] |
toBytes(char param)
Converts the given parameter to its byte representation.
|
static byte[] |
toBytes(char[] param)
Converts the given parameter to its byte representation.
|
static byte[] |
toBytes(Character param)
Converts the given parameter to its byte representation.
|
static byte[] |
toBytes(Currency param)
Converts the given parameter to its byte representation.
|
static byte[] |
toBytes(Date param)
Converts the given parameter to its byte representation.
|
static byte[] |
toBytes(double param)
Converts the given parameter to its byte representation.
|
static byte[] |
toBytes(Double param)
Converts the given parameter to its byte representation.
|
static byte[] |
toBytes(float param)
Converts the given parameter to its byte representation.
|
static byte[] |
toBytes(Float param)
Converts the given parameter to its byte representation.
|
static byte[] |
toBytes(int param)
Converts the given parameter to its byte representation.
|
static byte[] |
toBytes(Integer param)
Converts the given parameter to its byte representation.
|
static byte[] |
toBytes(long param)
Converts the given parameter to its byte representation.
|
static byte[] |
toBytes(Long param)
Converts the given parameter to its byte representation.
|
static byte[] |
toBytes(RsDate param)
Converts the given parameter to its byte representation.
|
static byte[] |
toBytes(RsDay param)
Converts the given parameter to its byte representation.
|
static byte[] |
toBytes(RsMonth param)
Converts the given parameter to its byte representation.
|
static byte[] |
toBytes(RsYear param)
Converts the given parameter to its byte representation.
|
static byte[] |
toBytes(Serializable o)
Converts the given Serializable to its byte representation.
|
static byte[] |
toBytes(short param)
Converts the given parameter to its byte representation.
|
static byte[] |
toBytes(Short param)
Converts the given parameter to its byte representation.
|
static byte[] |
toBytes(String param)
Converts the given parameter (UTF8) to its byte representation.
|
static byte[] |
toBytes(Timestamp param)
Converts the given parameter to its byte representation.
|
static byte[] |
toBytes(TimeZone param)
Converts the given parameter to its byte representation.
|
static byte[] |
toBytes(URL param)
Converts the given parameter to its byte representation.
|
static char |
toChar(byte[] bytes)
Converts the given bytes to char.
|
static char[] |
toCharArray(byte[] bytes)
Converts the given bytes to float.
|
static Character |
toCharObject(byte[] bytes)
Converts the given bytes to Character.
|
static Currency |
toCurrency(byte[] bytes)
Converts the given bytes to Currency.
|
static Date |
toDate(byte[] bytes)
Converts the given bytes to Date.
|
static double |
toDouble(byte[] bytes)
Converts the given bytes to double.
|
static Double |
toDoubleObject(byte[] bytes)
Converts the given bytes to Double.
|
static float |
toFloat(byte[] bytes)
Converts the given bytes to float.
|
static Float |
toFloatObject(byte[] bytes)
Converts the given bytes to Float.
|
static int |
toInt(byte[] bytes)
Converts the given bytes to int.
|
static Integer |
toIntObject(byte[] bytes)
Converts the given bytes to Integer.
|
static long |
toLong(byte[] bytes)
Converts the given bytes to long.
|
static Long |
toLongObject(byte[] bytes)
Converts the given bytes to Integer.
|
static Object |
toObject(byte[] bytes)
Converts a byte array to a
Serializable. |
static RsDate |
toRsDate(byte[] bytes)
Converts the given bytes to Date.
|
static RsDate |
toRsDay(byte[] bytes)
Converts the given bytes to Day.
|
static RsMonth |
toRsMonth(byte[] bytes)
Converts the given bytes to Month.
|
static RsYear |
toRsYear(byte[] bytes)
Converts the given bytes to Month.
|
static short |
toShort(byte[] bytes)
Converts the given bytes to short.
|
static Short |
toShortObject(byte[] bytes)
Converts the given bytes to Short.
|
static String |
toString(byte[] bytes)
Converts the given bytes to string (UTF8).
|
static Timestamp |
toTimestamp(byte[] bytes)
Converts the given bytes to Date.
|
static TimeZone |
toTimeZone(byte[] bytes)
Converts the given bytes to TimeZone.
|
static URL |
toURL(byte[] bytes)
Converts the given bytes to URL.
|
public static byte[] toBytes(short param)
param - parameterpublic static byte[] toBytes(Short param)
param - parameterpublic static short toShort(byte[] bytes)
bytes - bytespublic static Short toShortObject(byte[] bytes)
bytes - bytespublic static byte[] toBytes(int param)
param - parameterpublic static byte[] toBytes(Integer param)
param - parameterpublic static int toInt(byte[] bytes)
bytes - bytespublic static Integer toIntObject(byte[] bytes)
bytes - bytespublic static byte[] toBytes(long param)
param - parameterpublic static byte[] toBytes(Long param)
param - parameterpublic static long toLong(byte[] bytes)
bytes - bytespublic static Long toLongObject(byte[] bytes)
bytes - bytespublic static byte[] toBytes(float param)
param - parameterpublic static byte[] toBytes(Float param)
param - parameterpublic static float toFloat(byte[] bytes)
bytes - bytespublic static Float toFloatObject(byte[] bytes)
bytes - bytespublic static byte[] toBytes(double param)
param - parameterpublic static byte[] toBytes(Double param)
param - parameterpublic static double toDouble(byte[] bytes)
bytes - bytespublic static Double toDoubleObject(byte[] bytes)
bytes - bytespublic static byte[] toBytes(char param)
param - parameterpublic static byte[] toBytes(Character param) throws UnsupportedEncodingException
param - parameterUnsupportedEncodingExceptionpublic static char toChar(byte[] bytes)
throws UnsupportedEncodingException
bytes - bytesUnsupportedEncodingExceptionpublic static Character toCharObject(byte[] bytes) throws UnsupportedEncodingException
bytes - bytesUnsupportedEncodingExceptionpublic static byte[] toBytes(char[] param)
throws UnsupportedEncodingException
param - parameterUnsupportedEncodingExceptionpublic static char[] toCharArray(byte[] bytes)
throws UnsupportedEncodingException
bytes - bytesUnsupportedEncodingExceptionpublic static byte[] toBytes(byte param)
param - parameterpublic static byte[] toBytes(Byte param)
param - parameterpublic static byte toByte(byte[] bytes)
bytes - bytespublic static Byte toByteObject(byte[] bytes)
bytes - bytespublic static byte[] toBytes(boolean param)
param - parameterpublic static byte[] toBytes(Boolean param)
param - parameterpublic static boolean toBoolean(byte[] bytes)
bytes - bytespublic static Boolean toBooleanObject(byte[] bytes)
bytes - bytespublic static byte[] toBytes(String param) throws UnsupportedEncodingException
param - parameterUnsupportedEncodingExceptionpublic static String toString(byte[] bytes) throws UnsupportedEncodingException
bytes - bytesUnsupportedEncodingExceptionpublic static byte[] toBytes(Date param)
param - parameterpublic static byte[] toBytes(RsDate param)
param - parameterpublic static byte[] toBytes(RsMonth param)
param - parameterpublic static byte[] toBytes(RsYear param)
param - parameterpublic static byte[] toBytes(RsDay param)
param - parameterpublic static Date toDate(byte[] bytes)
bytes - bytespublic static RsDate toRsDay(byte[] bytes)
bytes - bytespublic static RsDate toRsDate(byte[] bytes)
bytes - bytespublic static RsMonth toRsMonth(byte[] bytes)
bytes - bytespublic static RsYear toRsYear(byte[] bytes)
bytes - bytespublic static byte[] toBytes(Timestamp param)
param - parameterpublic static Timestamp toTimestamp(byte[] bytes)
bytes - bytespublic static byte[] toBytes(Currency param) throws UnsupportedEncodingException
param - parameterUnsupportedEncodingExceptionpublic static Currency toCurrency(byte[] bytes) throws UnsupportedEncodingException
bytes - bytesUnsupportedEncodingExceptionpublic static byte[] toBytes(TimeZone param) throws UnsupportedEncodingException
param - parameterUnsupportedEncodingExceptionpublic static TimeZone toTimeZone(byte[] bytes) throws UnsupportedEncodingException
bytes - bytesUnsupportedEncodingExceptionpublic static byte[] toBytes(URL param) throws UnsupportedEncodingException
param - parameterUnsupportedEncodingExceptionpublic static URL toURL(byte[] bytes) throws UnsupportedEncodingException, MalformedURLException
bytes - bytesUnsupportedEncodingExceptionMalformedURLExceptionpublic static byte[] toBytes(Serializable o) throws IOException
o - serializableIOExceptionpublic static Object toObject(byte[] bytes) throws ClassNotFoundException, IOException
Serializable.bytes - the bytes from a serializableSerializableClassNotFoundExceptionIOExceptionCopyright © 2014. All rights reserved.