Package com.oss.asn1

Class ISO8601String

All Implemented Interfaces:
com.oss.asn1.Sizeable, Serializable, Cloneable

public class ISO8601String extends AbstractString16
The ISO8601String class represents the ASN.1 TIME type
Since:
ASN.1/Java 6.0
See Also:
  • Field Details

  • Constructor Details

    • ISO8601String

      public ISO8601String()
      The default constructor.
    • ISO8601String

      public ISO8601String(String value)
      Construct from a String.
      Parameters:
      value - the String to set 'this' object to.
    • ISO8601String

      public ISO8601String(char[] value)
      Construct from a char array.
      Parameters:
      value - the char array to set 'this' object to.
  • Method Details

    • clone

      public ISO8601String clone()
      Clone 'this' object.
      Overrides:
      clone in class AbstractString16
      Returns:
      deep copy of 'this' object.
    • validateTime

      public static boolean validateTime(String strValue) throws com.oss.util.BadTimeValueException
      Does basic sanity checks for the value of Time type. This version of the method checks if:
      1. the month is in range 1..12
      2. the week is in range 1..53
      3. the day is in range 1..7 or 1..31 or 1..366
      4. the hour is in range 0..24
      5. the minute is in range 0..59
      6. the second is in range 0..60
      If this is not the case a BadTimeValueException exception is thrown.
      Parameters:
      strValue - value of ISO8601String time type to check.
      Returns:
      true if value passed validation check
      Throws:
      com.oss.util.BadTimeValueException - if any component has an illegal value.
    • getTypeName

      public String getTypeName()
      Returns the name of ASN.1 type this java class represents.
      Overrides:
      getTypeName in class AbstractData
      Returns:
      the name of the ASN.1 type.