Package org.bouncycastle.asn1.tsp

## Class ArchiveTimeStampSequence

- java.lang.Object
- - org.bouncycastle.asn1.ASN1Object
  - - org.bouncycastle.asn1.tsp.ArchiveTimeStampSequence

- All Implemented Interfaces:
    `ASN1Encodable`, `Encodable`

      public class ArchiveTimeStampSequence
      extends ASN1Object

  Implementation of ArchiveTimeStampSequence type, as defined in RFC4998.

  An ArchiveTimeStampSequence corresponds to a SEQUENCE OF ArchiveTimeStampChains and has the following ASN.1 Syntax:

  ArchiveTimeStampSequence ::= SEQUENCE OF ArchiveTimeStampChain

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ArchiveTimeStampSequence​(ArchiveTimeStampChain archiveTimeStampChain)` |
    `ArchiveTimeStampSequence​(ArchiveTimeStampChain[] archiveTimeStampChains)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `ArchiveTimeStampSequence` | `append​(ArchiveTimeStampChain chain)` | Adds an `ArchiveTimeStampChain` to the ArchiveTimeStamp sequence.
    `ArchiveTimeStampChain[]` | `getArchiveTimeStampChains()` | Returns the sequence of ArchiveTimeStamp chains that compose the ArchiveTimeStamp sequence.
    `static ArchiveTimeStampSequence` | `getInstance​(java.lang.Object obj)` | Return an ArchiveTimestampSequence from the given object.
    `int` | `size()` |
    `ASN1Primitive` | `toASN1Primitive()` | Method providing a primitive representation of this object suitable for encoding.

    - ### Methods inherited from class org.bouncycastle.asn1.ASN1Object

      `encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ArchiveTimeStampSequence

          public ArchiveTimeStampSequence​(ArchiveTimeStampChain archiveTimeStampChain)

    - #### ArchiveTimeStampSequence

          public ArchiveTimeStampSequence​(ArchiveTimeStampChain[] archiveTimeStampChains)

  - ### Method Detail

    - #### getInstance

          public static ArchiveTimeStampSequence getInstance​(java.lang.Object obj)

      Return an ArchiveTimestampSequence from the given object.
      Parameters:
        `obj` - the object we want converted.
      Returns:
        an ArchiveTimeStampSequence instance, or null.
      Throws:
        `java.lang.IllegalArgumentException` - if the object cannot be converted.

    - #### getArchiveTimeStampChains

          public ArchiveTimeStampChain[] getArchiveTimeStampChains()

      Returns the sequence of ArchiveTimeStamp chains that compose the ArchiveTimeStamp sequence.
      Returns:
        the `ASN1Sequence` containing the ArchiveTimeStamp chains.

    - #### size

          public int size()

    - #### append

          public ArchiveTimeStampSequence append​(ArchiveTimeStampChain chain)

      Adds an `ArchiveTimeStampChain` to the ArchiveTimeStamp sequence.
      Parameters:
        `chain` - the `ArchiveTimeStampChain` to add
      Returns:
        returns the modified sequence.

    - #### toASN1Primitive

          public ASN1Primitive toASN1Primitive()

      Description copied from class: `ASN1Object`
      Method providing a primitive representation of this object suitable for encoding.
      Specified by:
        `toASN1Primitive` in interface `ASN1Encodable`
      Specified by:
        `toASN1Primitive` in class `ASN1Object`
      Returns:
        a primitive representation of this object.