Class cryptiX.utils.Util
All Packages Class Hierarchy This Package Previous Next Index
Class cryptiX.utils.Util
java.lang.Object
|
+----cryptiX.utils.Util
- public class Util
- extends Object
-
Util()
-
-
AlgID(String)
- create an AlgorithmIdentifier Object without parameter
-
AlgID(String, ASN1Object)
- create an AlgorithmIdentifier Object from an AlgorithmIdentifier string
-
AlgIDAlgorithm(ASN1Object)
- returns the parameter from an AlgorithmIdentifier Object
-
AlgIDParameter(ASN1Object)
- returns the parameter from an AlgorithmIdentifier Object
-
arraycontains(Object[], Object)
-
-
byteArrayToString(byte[])
-
-
charCount(String, char)
-
-
countOnes(byte)
-
-
countOnes(int)
-
-
countOnes(long)
-
-
Date2UTCTime(Date)
-
-
doubleToString(double)
-
-
even(long)
-
-
fixedRead(InputStream, byte[], int, int)
-
-
flattenStrarr(String[])
-
-
int2string(int)
- converts an integer to a string with length 2
-
lsDateStr(Date)
-
-
match(String, String)
-
-
odd(long)
-
-
pow(long, long)
-
-
sameLength(String, String)
-
-
sortStrings(String[])
-
-
splitStr(String)
-
-
strCSpan(String, String)
-
-
strSpan(String, String)
-
-
system(String)
-
-
UTCTime2Date(String)
-
Util
public Util()
lsDateStr
public static String lsDateStr(Date date)
strSpan
public static int strSpan(String str,
String charSet)
strCSpan
public static int strCSpan(String str,
String charSet)
match
public static boolean match(String pattern,
String string)
sameLength
public static int sameLength(String str1,
String str2)
charCount
public static int charCount(String str,
char c)
splitStr
public static String[] splitStr(String str)
flattenStrarr
public static String flattenStrarr(String strs[])
sortStrings
public static void sortStrings(String strings[])
pow
public static long pow(long a,
long b) throws ArithmeticException
doubleToString
public static String doubleToString(double d)
even
public static boolean even(long n)
odd
public static boolean odd(long n)
countOnes
public static int countOnes(byte n)
countOnes
public static int countOnes(int n)
countOnes
public static int countOnes(long n)
fixedRead
public static int fixedRead(InputStream in,
byte b[],
int off,
int len) throws IOException
arraycontains
public static boolean arraycontains(Object array[],
Object element)
system
public static int system(String cmd)
byteArrayToString
public static String byteArrayToString(byte buf[])
AlgIDAlgorithm
public static String AlgIDAlgorithm(ASN1Object ai) throws CodingException
- returns the parameter from an AlgorithmIdentifier Object
- Parameters:
- ai - the AlgorithmIdentifier Object
AlgIDParameter
public static ASN1Object AlgIDParameter(ASN1Object ai) throws CodingException
- returns the parameter from an AlgorithmIdentifier Object
- Parameters:
- ai - the AlgorithmIdentifier Object
AlgID
public static ASN1Object AlgID(String algID)
- create an AlgorithmIdentifier Object without parameter
- Parameters:
- algID - the OID in string form (e.g. "1.2.840.113549.1.1.1")
- Returns:
- the ASN1Object AlgorithmIdentifier
AlgID
public static ASN1Object AlgID(String algID,
ASN1Object parameter)
- create an AlgorithmIdentifier Object from an AlgorithmIdentifier string
- Parameters:
- algID - the OID in string form (e.g. "1.2.840.113549.1.1.1")
- parameter - the parameter for this algorithm
- Returns:
- the ASN1Object AlgorithmIdentifier
UTCTime2Date
public static Date UTCTime2Date(String utc)
Date2UTCTime
public static String Date2UTCTime(Date d)
int2string
public static String int2string(int i)
- converts an integer to a string with length 2
All Packages Class Hierarchy This Package Previous Next Index