public final class CU
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CU.BoolSerializer |
static class |
CU.DoubleSerializer |
static class |
CU.EnumDeserializer |
static class |
CU.EnumMap |
static class |
CU.EnumSerializer |
static class |
CU.IntSerializer |
static class |
CU.LongSerializer |
static class |
CU.RegexDeserializer |
static class |
CU.RegexSerializer |
Constructor and Description |
---|
CU() |
Modifier and Type | Method and Description |
---|---|
static JsonObject |
advToJson(java.lang.Object oObj) |
static double |
asDec00(double d) |
static java.lang.String |
asHex(byte b) |
static java.lang.String[] |
asHex(byte[] oBytes) |
static java.lang.String |
asHex(int n) |
static JsonObject |
asJson(java.lang.Object oObj) |
static JsonArray |
asJsonArray(java.lang.Object oObj) |
static java.lang.String |
asPrettyTimeStamp(long mTS) |
static java.lang.String |
asUnambiguousDate(long mTS) |
static java.lang.String |
cleanJsonStr(java.lang.String sStr) |
static byte[] |
compressBytes(byte[] bytes) |
static byte[] |
createHdrLenMark(int nLen) |
static byte[] |
decompress(byte[] compressedData) |
static byte[] |
decompress(byte[] compressedData,
int nOffset,
int nLen) |
static java.lang.Object |
deserializeObject(byte[] oBytes) |
static java.lang.String |
durationPic(long mIn) |
static java.lang.Exception |
e(java.lang.String s) |
static java.lang.Object[] |
extendArray(java.lang.Object[] oExist,
java.lang.Object oNew) |
static byte[] |
fileAsBytes(java.lang.String sFileName) |
static java.lang.String |
fileAsString(java.lang.String sFileName) |
static java.lang.String[] |
fileAsStrings(java.lang.String sFileName) |
static long |
getAdler(java.lang.String sSrc) |
static java.lang.String |
getAdlerString(java.lang.String sSrc) |
static java.lang.String |
getCurTS()
e.g.
|
static java.lang.String |
getDayOfWeek(long mTS) |
static java.lang.String |
getFileTimeStamp() |
static int |
getHdrLen(byte[] oBuf,
int nPos) |
static java.lang.String |
getMD5(java.lang.String sStr) |
static java.lang.String |
getPrettyTimeStamp() |
static java.lang.String |
getStackAsString(java.lang.Exception e) |
static java.lang.String |
getStrTS(long mTS) |
static java.lang.String |
getTimeMark() |
static java.lang.String |
getTimeStamp() |
static java.lang.String |
getTimeStamp(long mTS) |
static java.lang.String |
getToday(java.lang.String sPattern) |
static boolean |
hasValue(java.lang.String s) |
static boolean |
isSame(double d1,
double d2) |
static boolean |
isTrue(java.lang.String sStr) |
static boolean |
isValidEnum(java.lang.Enum<?> oEnum,
java.lang.String sTest) |
static <T> T |
jsonAsClassInstance(JsonObject oJR,
java.lang.Class<T> T) |
static <T> T |
jsonAsClassInstance(JsonObject oJR,
java.lang.Class<T> T,
boolean bDefPrim) |
static java.lang.String |
jsonAsPrettyJsonStr(JsonObject oJ) |
static <T> T |
jsonFileAsClassInstance(java.lang.String sFileName,
java.lang.Class<T> T) |
static <T> T |
jsonStrAsClassInstance(java.lang.String sStr,
java.lang.Class<T> T) |
static <T> T |
jsonStrAsClassInstance(java.lang.String sStr,
java.lang.Class<T> T,
boolean bDefPrim) |
static <T> T[] |
loadFileAsClassArray(java.lang.String sFileName,
java.lang.Class<T> T) |
static <T> T[] |
loadStringAsClassArray(java.lang.String sStr,
java.lang.Class<T> T) |
static java.lang.String |
maxStr(java.lang.String sStr,
int nMax) |
static JsonObject |
objAsJson(java.lang.Object oObj) |
static java.lang.String |
objAsJsonStr(java.lang.Object oObj) |
static java.lang.String |
objAsPrettyJsonStr(java.lang.Object oObj) |
static java.lang.String |
objAsPrettyLargeJsonStr(java.lang.Object oObj) |
static long |
parseGmailTS(java.lang.String sTS) |
static long |
parseJavascriptTS(java.lang.String sTS) |
static long |
parseTimeStamp(java.lang.String sTS) |
static java.lang.String |
proper(java.lang.String s) |
static java.lang.String |
repl(java.lang.String sIn,
java.lang.String sOld,
java.lang.String sNew) |
static java.lang.String |
replAll(java.lang.String sIn,
java.lang.String sOld,
java.lang.String sNew) |
static java.lang.String |
replicate(char cChar,
int nRepl) |
static byte[] |
serializeObject(java.io.Serializable oObj) |
static long |
stdDateStrAsTS(java.lang.String sDate) |
public static java.lang.Exception e(java.lang.String s)
public static java.lang.String getMD5(java.lang.String sStr) throws java.lang.Exception
java.lang.Exception
public static boolean hasValue(java.lang.String s)
public static boolean isValidEnum(java.lang.Enum<?> oEnum, java.lang.String sTest)
public static long getAdler(java.lang.String sSrc)
public static java.lang.String[] asHex(byte[] oBytes)
public static java.lang.String asHex(byte b)
public static java.lang.String asHex(int n)
public static boolean isTrue(java.lang.String sStr)
public static java.lang.String repl(java.lang.String sIn, java.lang.String sOld, java.lang.String sNew)
public static java.lang.String replAll(java.lang.String sIn, java.lang.String sOld, java.lang.String sNew)
public static java.lang.String getStackAsString(java.lang.Exception e)
public static byte[] compressBytes(byte[] bytes) throws java.lang.Exception
java.lang.Exception
public static byte[] decompress(byte[] compressedData) throws java.lang.Exception
java.lang.Exception
public static byte[] decompress(byte[] compressedData, int nOffset, int nLen) throws java.lang.Exception
java.lang.Exception
public static byte[] createHdrLenMark(int nLen)
public static int getHdrLen(byte[] oBuf, int nPos)
public static byte[] serializeObject(java.io.Serializable oObj) throws java.lang.Exception
java.lang.Exception
public static java.lang.Object deserializeObject(byte[] oBytes) throws java.lang.Exception
java.lang.Exception
public static java.lang.String getAdlerString(java.lang.String sSrc)
public static java.lang.String fileAsString(java.lang.String sFileName) throws java.lang.Exception
java.lang.Exception
public static java.lang.String[] fileAsStrings(java.lang.String sFileName) throws java.lang.Exception
java.lang.Exception
public static byte[] fileAsBytes(java.lang.String sFileName) throws java.lang.Exception
java.lang.Exception
public static double asDec00(double d)
public static boolean isSame(double d1, double d2)
public static long stdDateStrAsTS(java.lang.String sDate) throws java.lang.Exception
java.lang.Exception
public static long parseGmailTS(java.lang.String sTS) throws java.lang.Exception
java.lang.Exception
public static long parseJavascriptTS(java.lang.String sTS) throws java.lang.Exception
java.lang.Exception
public static long parseTimeStamp(java.lang.String sTS) throws java.lang.Exception
java.lang.Exception
public static java.lang.String getCurTS()
public static java.lang.String getToday(java.lang.String sPattern)
public static java.lang.String getStrTS(long mTS)
public static java.lang.String getTimeStamp()
public static java.lang.String getTimeMark()
public static java.lang.String getTimeStamp(long mTS)
public static java.lang.String getFileTimeStamp()
public static java.lang.String getPrettyTimeStamp()
public static java.lang.String asPrettyTimeStamp(long mTS)
public static java.lang.String asUnambiguousDate(long mTS)
public static java.lang.String getDayOfWeek(long mTS)
public static java.lang.String durationPic(long mIn)
public static java.lang.String maxStr(java.lang.String sStr, int nMax)
public static java.lang.String replicate(char cChar, int nRepl)
public static java.lang.String proper(java.lang.String s)
public static java.lang.Object[] extendArray(java.lang.Object[] oExist, java.lang.Object oNew)
public static JsonObject asJson(java.lang.Object oObj) throws java.lang.Exception
java.lang.Exception
public static JsonArray asJsonArray(java.lang.Object oObj) throws java.lang.Exception
java.lang.Exception
public static JsonObject advToJson(java.lang.Object oObj) throws java.lang.Exception
java.lang.Exception
public static java.lang.String objAsJsonStr(java.lang.Object oObj) throws java.lang.Exception
java.lang.Exception
public static JsonObject objAsJson(java.lang.Object oObj) throws java.lang.Exception
java.lang.Exception
public static java.lang.String objAsPrettyJsonStr(java.lang.Object oObj) throws java.lang.Exception
java.lang.Exception
public static java.lang.String objAsPrettyLargeJsonStr(java.lang.Object oObj) throws java.lang.Exception
java.lang.Exception
public static java.lang.String jsonAsPrettyJsonStr(JsonObject oJ) throws java.lang.Exception
java.lang.Exception
public static <T> T jsonFileAsClassInstance(java.lang.String sFileName, java.lang.Class<T> T) throws java.lang.Exception
java.lang.Exception
public static <T> T jsonStrAsClassInstance(java.lang.String sStr, java.lang.Class<T> T) throws java.lang.Exception
java.lang.Exception
public static <T> T jsonStrAsClassInstance(java.lang.String sStr, java.lang.Class<T> T, boolean bDefPrim) throws java.lang.Exception
java.lang.Exception
public static <T> T jsonAsClassInstance(JsonObject oJR, java.lang.Class<T> T) throws java.lang.Exception
java.lang.Exception
public static <T> T jsonAsClassInstance(JsonObject oJR, java.lang.Class<T> T, boolean bDefPrim) throws java.lang.Exception
java.lang.Exception
public static <T> T[] loadFileAsClassArray(java.lang.String sFileName, java.lang.Class<T> T) throws java.lang.Exception
java.lang.Exception
public static <T> T[] loadStringAsClassArray(java.lang.String sStr, java.lang.Class<T> T) throws java.lang.Exception
java.lang.Exception
public static java.lang.String cleanJsonStr(java.lang.String sStr)