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

Constructor Index

 o Util()

Method Index

 o AlgID(String)
create an AlgorithmIdentifier Object without parameter
 o AlgID(String, ASN1Object)
create an AlgorithmIdentifier Object from an AlgorithmIdentifier string
 o AlgIDAlgorithm(ASN1Object)
returns the parameter from an AlgorithmIdentifier Object
 o AlgIDParameter(ASN1Object)
returns the parameter from an AlgorithmIdentifier Object
 o arraycontains(Object[], Object)
 o byteArrayToString(byte[])
 o charCount(String, char)
 o countOnes(byte)
 o countOnes(int)
 o countOnes(long)
 o Date2UTCTime(Date)
 o doubleToString(double)
 o even(long)
 o fixedRead(InputStream, byte[], int, int)
 o flattenStrarr(String[])
 o int2string(int)
converts an integer to a string with length 2
 o lsDateStr(Date)
 o match(String, String)
 o odd(long)
 o pow(long, long)
 o sameLength(String, String)
 o sortStrings(String[])
 o splitStr(String)
 o strCSpan(String, String)
 o strSpan(String, String)
 o system(String)
 o UTCTime2Date(String)

Constructors

 o Util
  public Util()

Methods

 o lsDateStr
  public static String lsDateStr(Date date)
 o strSpan
  public static int strSpan(String str,
                            String charSet)
 o strCSpan
  public static int strCSpan(String str,
                             String charSet)
 o match
  public static boolean match(String pattern,
                              String string)
 o sameLength
  public static int sameLength(String str1,
                               String str2)
 o charCount
  public static int charCount(String str,
                              char c)
 o splitStr
  public static String[] splitStr(String str)
 o flattenStrarr
  public static String flattenStrarr(String strs[])
 o sortStrings
  public static void sortStrings(String strings[])
 o pow
  public static long pow(long a,
                         long b) throws ArithmeticException
 o doubleToString
  public static String doubleToString(double d)
 o even
  public static boolean even(long n)
 o odd
  public static boolean odd(long n)
 o countOnes
  public static int countOnes(byte n)
 o countOnes
  public static int countOnes(int n)
 o countOnes
  public static int countOnes(long n)
 o fixedRead
  public static int fixedRead(InputStream in,
                              byte b[],
                              int off,
                              int len) throws IOException
 o arraycontains
  public static boolean arraycontains(Object array[],
                                      Object element)
 o system
  public static int system(String cmd)
 o byteArrayToString
  public static String byteArrayToString(byte buf[])
 o AlgIDAlgorithm
  public static String AlgIDAlgorithm(ASN1Object ai) throws CodingException
returns the parameter from an AlgorithmIdentifier Object
Parameters:
ai - the AlgorithmIdentifier Object
 o AlgIDParameter
  public static ASN1Object AlgIDParameter(ASN1Object ai) throws CodingException
returns the parameter from an AlgorithmIdentifier Object
Parameters:
ai - the AlgorithmIdentifier Object
 o 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
 o 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
 o UTCTime2Date
  public static Date UTCTime2Date(String utc)
 o Date2UTCTime
  public static String Date2UTCTime(Date d)
 o 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