Package com.oss.asn1

Class RelaySafeChoice

All Implemented Interfaces:
Serializable, Cloneable

public abstract class RelaySafeChoice extends Choice
The RelaySafeChoice class represents the ASN.1 CHOICE type but has additional ability to store unknown extension and make it available for further relaying.
Since:
ASN.1/Java 1.0-beta A
See Also:
  • Constructor Details

    • RelaySafeChoice

      public RelaySafeChoice()
      The default constructor.
    • RelaySafeChoice

      public RelaySafeChoice(AbstractData chosen)
      Construct a RelaySafeChoice with the chosen component.
      Parameters:
      chosen - the component that is being chosen.
    • RelaySafeChoice

      public RelaySafeChoice(AbstractData chosen, int selector)
      Construct a RelaySafeChoice with the chosen component.
      Parameters:
      chosen - the component that is being chosen.
      selector - the integer value indicating the chosen component.
  • Method Details

    • setChosenValue

      public final void setChosenValue(AbstractData value)
      Overrides the setChosenValue method of the superclass to clean up the unknown extension.
      Parameters:
      value - the AbstractData object that is the chosen component.
    • getUnknownExtension

      public final byte[] getUnknownExtension()
      Returns the unknown extension saved for relaying. The unknown extension is represented by the byte array that contains the encoding of the unknown extension with the transfer syntax, identified by the getRelayID method.
      Returns:
      encoding of the unknown extension
    • addUnknownExtension

      public final void addUnknownExtension(byte[] unknownExtension, String relayID)
      Saves the encoding of the unknown extension for further relaying. The unknown extension is represented by the byte array that contains the encoding of the unknown extension with the transfer syntax, identified by the relayID parameter.
      Parameters:
      unknownExtension - encoding of the unknown extension
      relayID - string that identifies the coder that decoded the unknown extension
    • getRelayID

      public final String getRelayID()
      Returns the identification of the coder that decoded the unknown extension, saved by the addUnknownExtension method.
      Returns:
      string that identifies the coder that decoded the unknown extension.
    • clone

      public Object clone()
      Clone 'this' object.
      Overrides:
      clone in class Choice
      Returns:
      a deep copy of 'this' object.
    • delete

      public void delete()
      Destroy the instance of the AbstractData. The contract of this method is to facilitate garbage collection by explicit destruction of the data that is no longer needed.
      Overrides:
      delete in class Choice