|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasn.StringUtilities
Methods in this class are used to determine whether characters may appear in certain ASN.1 String type.
| Method Summary | |
static int |
formatGeneralizedTime(byte[] buf,
int off,
int len,
Calendar date)
|
static int |
formatUTCTime(byte[] buf,
int off,
int len,
Calendar date)
|
static boolean |
isDigit(char c)
Determines if the specified character is an ISO-Latin-1 digit ('0' through '9'). |
static boolean |
isIA5(char c)
Tests wether the specified character is a valid IA5String character. |
static boolean |
isIA5(String text)
Tests wether the specified string contains only valid ASN.1 PrintableString characters. |
static boolean |
isNumeric(char c)
Tests wether the specified character is a valid ASN.1 NumericString character. |
static boolean |
isPrintable(char c)
Tests wether the specified character is a valid ASN.1 PrintableString character. |
static boolean |
isPrintable(String text)
Tests wether the specified string contains only valid ASN.1 PrintableString characters. |
static boolean |
isVisible(char c)
Tests wether the specified character is a valid VisibleString character. |
static String |
normalize(String s)
Returns a new string derived from the specified one after having removed leading and trailing white space and converted internal substrings of one or more consecutive white space characters to a single space. |
static int |
parse2Digits(char[] s,
int off,
int len,
int min,
int max)
|
static int |
parse4Digits(char[] s,
int off,
int len,
int min,
int max)
|
static int |
parseDigit(char c)
Returns the numeric value of the specified character in the decimal radix. |
static Calendar |
parseGeneralizedTime(char[] s,
int off,
int len)
Decodes an ASN.1 GeneralizedTime value from the sequence of len characters starting at off in
s.
|
static Calendar |
parseUTCTime(char[] s,
int off,
int len)
Decodes an ASN.1 UTCTime value from the sequence of len
characters starting at off in s.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static boolean isNumeric(char c)
c - the character to be checked.
true if the specified character is a valid
NumericString character; false otherwise.public static boolean isPrintable(char c)
c - the character to be checked.
true if the specified character is a valid
PrintableString character; false otherwise.public static boolean isPrintable(String text)
text - the string to be checked.
true if the specified string is a valid
PrintableString; false otherwise.public static boolean isVisible(char c)
c - the character to be checked.
true if the specified character is a valid
VisibleString character; false otherwise.public static boolean isIA5(char c)
c - the character to be checked.
true if the specified character is a valid IA5String
character; false otherwise.public static boolean isIA5(String text)
text - the string to be checked.
true if the specified string is a valid
PrintableString; false otherwise.public static String normalize(String s)
s - the string to be normalized.
public static Calendar parseUTCTime(char[] s,
int off,
int len)
throws ParseException
len
characters starting at off in s.
If s is null, a NullPointerException
is thrown.
If off is negative, or len is negative, or
off+len is greater than the length of the array
s, then an IndexOutOfBoundsException is
thrown.
s - the array of characters to be parsed.off - the offset in the array from which the characters are parsed.len - the number of characters to be parsed.
Calendar instance describing the parsed UTCTime.
ParseException
public static Calendar parseGeneralizedTime(char[] s,
int off,
int len)
throws ParseException
len characters starting at off in
s.
If s is null, a NullPointerException
is thrown.
If off is negative, or len is negative, or
off+len is greater than the length of the array
s, then an IndexOutOfBoundsException is
thrown.
s - the array of characters to be parsed.off - the offset in the array from which the characters are parsed.len - the number of characters to be parsed.
Calendar instance describing the parsed time.
ParseException
public static int formatUTCTime(byte[] buf,
int off,
int len,
Calendar date)
public static int formatGeneralizedTime(byte[] buf,
int off,
int len,
Calendar date)
public static int parse2Digits(char[] s,
int off,
int len,
int min,
int max)
throws ParseException
ParseException
public static int parse4Digits(char[] s,
int off,
int len,
int min,
int max)
throws ParseException
ParseException
public static int parseDigit(char c)
throws ParseException
c - the character to be converted.
ParseException - if the character is not a decimal digit.public static boolean isDigit(char c)
c - the character to be tested.
true if the character is a digit; false
otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||