|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.objsys.asn1j.runtime.Asn1PerTime
public class Asn1PerTime
Provides methods to encode and decode TIME values in PER. The application representation of the TIME value is a TimeValue, as defined in X.680. Some notes on formatting: + A year/century should have a leading plus sign if and only if the year/century > 9999/99. + A year/century having 5/3 or more digits should never include leading zeros. A value with a year of 1985 has the property Year="Basic" and is formatted with only 4 digits, never more. + A year/century should never have fewer than four/two digits. This is the only case where leading zeros may be used. + When FRACTION is used to specify a number of fraction digits, the string representation must have precisely that many digits for the fraction. Note that FRACTION is not to be used with DURATION.
Field Summary | |
---|---|
static int |
ANY
With CENTURY/YEAR, ANY indicates that century/year is unconstrained. |
static int |
CENTURY
|
static int |
DATE
|
static int |
DATE_TIME
|
static int |
DAY
|
static int |
DIFF
Indicates a time includes a timezone difference from UTC. |
static int |
DT_ANY_CENTURY
|
static int |
DT_ANY_YEAR
|
static int |
DT_ANY_YEAR_DAY
|
static int |
DT_ANY_YEAR_MONTH
|
static int |
DT_ANY_YEAR_MONTH_DAY
|
static int |
DT_ANY_YEAR_WEEK
|
static int |
DT_ANY_YEAR_WEEK_DAY
|
static int |
DT_CENTURY
|
static int |
DT_HOURS
|
static int |
DT_HOURS_AND_DIFF
|
static int |
DT_HOURS_AND_DIFF_AND_FRACTION
|
static int |
DT_HOURS_AND_FRACTION
|
static int |
DT_HOURS_UTC
|
static int |
DT_HOURS_UTC_AND_FRACTION
|
static int |
DT_MINUTES
|
static int |
DT_MINUTES_AND_DIFF
|
static int |
DT_MINUTES_AND_DIFF_AND_FRACTION
|
static int |
DT_MINUTES_AND_FRACTION
|
static int |
DT_MINUTES_UTC
|
static int |
DT_MINUTES_UTC_AND_FRACTION
|
static int |
DT_SECONDS
|
static int |
DT_SECONDS_AND_DIFF
|
static int |
DT_SECONDS_AND_DIFF_AND_FRACTION
|
static int |
DT_SECONDS_AND_FRACTION
|
static int |
DT_SECONDS_UTC
|
static int |
DT_SECONDS_UTC_AND_FRACTION
|
static int |
DT_YEAR
|
static int |
DT_YEAR_DAY
|
static int |
DT_YEAR_MONTH
|
static int |
DT_YEAR_MONTH_DAY
|
static int |
DT_YEAR_WEEK
|
static int |
DT_YEAR_WEEK_DAY
|
static int |
DURATION
Indicates a duration. |
static int |
FRACTION
This is a mask that is used to mark off the bits used for the number of decimal places for a fraction. |
static int |
HOURS
|
static int |
MINUTES
|
static int |
MONTH
|
static int |
SECONDS
|
static int |
TIME_OF_DAY
|
static int |
UTC
Indicates a time is UTC. |
static int |
WEEK
Week is present. |
static int |
YEAR
|
Constructor Summary | |
---|---|
Asn1PerTime()
|
Method Summary | |
---|---|
static java.lang.String |
decodeDate(Asn1PerDecodeBuffer source,
int flags)
Decode a date value from the given source. |
static java.lang.String |
decodeDateTime(Asn1PerDecodeBuffer source,
int flags)
Decode a date-time value from the given source. |
static java.lang.String |
decodeDuration(Asn1PerDecodeBuffer source,
boolean recurring)
Decode a (possibly recurring) duration from the given source. |
static java.lang.String |
decodeIntervalDE(Asn1PerDecodeBuffer source,
boolean recurring,
int flags)
|
static java.lang.String |
decodeIntervalSD(Asn1PerDecodeBuffer source,
boolean recurring,
int flags)
|
static java.lang.String |
decodeIntervalSE(Asn1PerDecodeBuffer source,
boolean recurring,
int flags)
|
static java.lang.String |
decodeTime(Asn1PerDecodeBuffer source,
int flags)
Decode a time value from the given source. |
static void |
encodeDate(Asn1PerEncoder encoder,
java.lang.String value,
int flags)
Encode a date value using the given encoder. |
static void |
encodeDateTime(Asn1PerEncoder encoder,
java.lang.String value,
int flags)
Encode a datetime value. |
static void |
encodeDuration(Asn1PerEncoder encoder,
java.lang.String value,
boolean recurring)
Encode a duration. |
static void |
encodeIntervalDE(Asn1PerEncoder encoder,
java.lang.String value,
boolean recurring,
int flags)
|
static void |
encodeIntervalSD(Asn1PerEncoder encoder,
java.lang.String value,
boolean recurring,
int flags)
|
static void |
encodeIntervalSE(Asn1PerEncoder encoder,
java.lang.String value,
boolean recurring,
int flags)
|
static void |
encodeTime(Asn1PerEncoder encoder,
java.lang.String value,
int flags)
Encode a time value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ANY
public static final int CENTURY
public static final int YEAR
public static final int MONTH
public static final int WEEK
When used for a date/datetime (without DURATION), MONTH is excluded.
public static final int DAY
public static final int HOURS
public static final int MINUTES
public static final int SECONDS
public static final int UTC
public static final int DIFF
public static final int FRACTION
value & FRACTION = # of decimal places
public static final int DURATION
public static final int DT_ANY_CENTURY
public static final int DT_ANY_YEAR
public static final int DT_ANY_YEAR_MONTH
public static final int DT_ANY_YEAR_MONTH_DAY
public static final int DT_ANY_YEAR_DAY
public static final int DT_ANY_YEAR_WEEK
public static final int DT_ANY_YEAR_WEEK_DAY
public static final int DT_CENTURY
public static final int DT_YEAR
public static final int DT_YEAR_MONTH
public static final int DT_YEAR_MONTH_DAY
public static final int DT_YEAR_DAY
public static final int DT_YEAR_WEEK
public static final int DT_YEAR_WEEK_DAY
public static final int DT_HOURS
public static final int DT_HOURS_UTC
public static final int DT_HOURS_AND_DIFF
public static final int DT_MINUTES
public static final int DT_MINUTES_UTC
public static final int DT_MINUTES_AND_DIFF
public static final int DT_SECONDS
public static final int DT_SECONDS_UTC
public static final int DT_SECONDS_AND_DIFF
public static final int DT_HOURS_AND_FRACTION
public static final int DT_HOURS_UTC_AND_FRACTION
public static final int DT_HOURS_AND_DIFF_AND_FRACTION
public static final int DT_MINUTES_AND_FRACTION
public static final int DT_MINUTES_UTC_AND_FRACTION
public static final int DT_MINUTES_AND_DIFF_AND_FRACTION
public static final int DT_SECONDS_AND_FRACTION
public static final int DT_SECONDS_UTC_AND_FRACTION
public static final int DT_SECONDS_AND_DIFF_AND_FRACTION
public static final int DATE
public static final int TIME_OF_DAY
public static final int DATE_TIME
Constructor Detail |
---|
public Asn1PerTime()
Method Detail |
---|
public static java.lang.String decodeDate(Asn1PerDecodeBuffer source, int flags) throws Asn1Exception
source
- flags
-
Asn1Exception
public static java.lang.String decodeDateTime(Asn1PerDecodeBuffer source, int flags) throws Asn1Exception
source
- flags
- Indicates what fields are expected. The flags should
indicate a complete date (YMD, YWD, or YD) and at least an hour
component.
Asn1Exception
public static java.lang.String decodeDuration(Asn1PerDecodeBuffer source, boolean recurring) throws Asn1Exception
source
- recurring
- true if the duration is a recurring duration
Asn1Exception
public static java.lang.String decodeIntervalSE(Asn1PerDecodeBuffer source, boolean recurring, int flags) throws Asn1Exception
Asn1Exception
public static java.lang.String decodeIntervalSD(Asn1PerDecodeBuffer source, boolean recurring, int flags) throws Asn1Exception
Asn1Exception
public static java.lang.String decodeIntervalDE(Asn1PerDecodeBuffer source, boolean recurring, int flags) throws Asn1Exception
Asn1Exception
public static java.lang.String decodeTime(Asn1PerDecodeBuffer source, int flags) throws Asn1Exception
source
- flags
- Indicates the expected fields.
Asn1Exception
public static void encodeDate(Asn1PerEncoder encoder, java.lang.String value, int flags) throws Asn1Exception
encoder
- value
- flags
-
Asn1Exception
public static void encodeDateTime(Asn1PerEncoder encoder, java.lang.String value, int flags) throws Asn1Exception
encoder
- value
- flags
-
Asn1Exception
public static void encodeDuration(Asn1PerEncoder encoder, java.lang.String value, boolean recurring) throws Asn1Exception
encoder
- value
- The durationrecurring
- true if value represents a recurring duration.
Asn1Exception
public static void encodeIntervalSE(Asn1PerEncoder encoder, java.lang.String value, boolean recurring, int flags) throws Asn1Exception
Asn1Exception
public static void encodeIntervalSD(Asn1PerEncoder encoder, java.lang.String value, boolean recurring, int flags) throws Asn1Exception
Asn1Exception
public static void encodeIntervalDE(Asn1PerEncoder encoder, java.lang.String value, boolean recurring, int flags) throws Asn1Exception
Asn1Exception
public static void encodeTime(Asn1PerEncoder encoder, java.lang.String value, int flags) throws Asn1Exception
encoder
- value
- flags
-
Asn1Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |