public final class MCast extends Object
All Funktions are static.
| Constructor and Description |
|---|
MCast() |
| Modifier and Type | Method and Description |
|---|---|
static byte |
byteFromHex(String in,
int offset)
Convert a two letter hex value to a single byte value.
|
static byte[] |
fromBinaryString(String in)
Convert a string with hex values in a byte array.
|
static Date |
objectToDate(Object value) |
static String |
objectToString(Object value) |
static String |
toBinaryString(byte[] in)
Convert the byte array to a string representation.
|
static boolean |
toboolean(Object _in,
boolean _default)
Convert String to boolean.
|
static byte[] |
toByteArray(String in) |
static Calendar |
toCalendar(Date _in) |
static Calendar |
toCalendar(Date _in,
TimeZone tz,
Locale l) |
static Calendar |
toCalendar(String _in) |
static String |
toCurrencyString(double _in)
Will round the value mathematically and
return every time a comma as separator and
two digits after comma.
|
static Date |
toDate(String _in,
Date _def)
Try to parse a String and return the equivalent Date object.
|
static double |
todouble(Object _in,
double _def)
Convert a string to double.
|
static float |
tofloat(Object _in,
float _def)
Convert a string to float.
|
static String |
toHex2String(byte in)
Convert a byte to a two letter hex value.
|
static String |
toHex2String(int _in)
Convert integer to two letter hex code.
|
static String |
toHex4String(int _in)
Convert integer to four letter hex code.
|
static Map<String,Object> |
toIndexedMap(Object... values)
Return an indexed map of the values.
|
static int |
toint(Object in,
int _def)
Converts String to int.
|
static int |
tointFromHex(String _in) |
static String |
toIsoDate(Calendar _in)
Calendar to iso date: yyyy-mm-dd
|
static String |
toIsoDate(Date _in)
Returns the date in iso format: yyyy-mm-dd
|
static String |
toIsoDateTime(Calendar _in) |
static String |
toIsoDateTime(Date _in)
Returns the date in iso time format: yyyy-mm-dd HH:mm:ss.SSS
|
static String |
toIsoDateTime(long timeStamp)
Calendar to iso date: yyyy-mm-dd
|
static long |
tolong(Object in,
long _def)
Converts a string to long.
|
static Date |
toSqlDate(Date date) |
static String |
toString(boolean _in)
Convert a boolean to string.
|
static String |
toString(byte[] in) |
static String |
toString(Calendar _in)
Return the date as string with format: yyyy-MM-dd_HH:mm:ss.SSS
using a date formater.
|
static String |
toString(Date _in)
Return the date as string with format: yyyy-MM-dd_HH:mm:ss.SSS
using a date formater.
|
static String |
toString(double _in)
Convert a double to string.
|
static String |
toString(float _in)
Convert a double to string.
|
static String |
toString(int _in)
Converts integer to String.
|
static String |
toString(int _in,
int _digits)
Converts integer to string with the minimum digits.
|
static String |
toString(long _in)
Convert long to string.
|
static String |
toString(String firstLine,
StackTraceElement[] trace) |
static String[] |
toStringArray(List<?> _v)
Put all list elements in a string list.
|
public static String toCurrencyString(double _in)
_in - public static Date toDate(String _in, Date _def)
If the time is not in the string, it will be set to "00:00:00". It is possible to leave year, in this case it will be replaced with the actuall year. If you leave month, it will be replaced with the actuall month.
_in - Iso DateTimepublic static String toString(Date _in)
_in - public static String toString(Calendar _in)
_in - public static String toIsoDate(Date _in)
_in - public static String toIsoDateTime(Date _in)
_in - public static String toBinaryString(byte[] in)
in - UnsupportedEncodingExceptionpublic static byte[] fromBinaryString(String in)
in - toBinaryStringpublic static byte byteFromHex(String in, int offset)
in - offset - public static String toHex2String(byte in)
in - UnsupportedEncodingExceptionpublic static String toIsoDateTime(long timeStamp)
_in - public static String toIsoDate(Calendar _in)
_in - public static boolean toboolean(Object _in, boolean _default)
_in - _default - public static float tofloat(Object _in, float _def)
_in - _def - public static double todouble(Object _in, double _def)
public static int toint(Object in, int _def)
_in - _def - public static long tolong(Object in, long _def)
_in - _def - public static String toString(double _in)
_in - public static String toString(float _in)
_in - public static String toString(boolean _in)
_in - public static String toString(int _in)
_in - public static String toString(int _in, int _digits)
_in - _numbers - public static String toString(long _in)
_in - public static String toHex2String(int _in)
_in - public static String toHex4String(int _in)
_in - public static String[] toStringArray(List<?> _v)
_v - public static int tointFromHex(String _in)
public static String toString(byte[] in)
public static byte[] toByteArray(String in)
public static String toString(String firstLine, StackTraceElement[] trace)
public static Map<String,Object> toIndexedMap(Object... values)
values - Copyright © 2014. All rights reserved.