Package com.oss.asn1

Class AbstractDataPositions

java.lang.Object
com.oss.asn1.AbstractDataPositions

public class AbstractDataPositions extends Object
The AbstractDataPositions class is a table which records position/offset information associated with AbstractData objects. Position information can be extracted from the table simply by supplying an AbstractData object's reference, for example table.get(component). This, however, can fail for ENUMERATED components, due to the same object reference can be used for multiple enumerated component occurrences. Positions for ENUMERATED components should be accessed by supplying reference to parent component and the child's component index, as table.get(component, parent, index).
Since:
ASN.1/Java 4.0 Beta A
  • Constructor Details

    • AbstractDataPositions

      public AbstractDataPositions()
      The constructor.
  • Method Details

    • put

      public void put(Object key, Position value)
      Put a component's position into the table. If component is already in the table then it is the ENUMERATED ambiguity case, so the position is set to null.
      Parameters:
      key - the Object representing an AbstractData component or a BLOB specifying the encoded form of an open type or contained value (byte[] or a ByteStorage).
      value - the component's position information
    • get

      public Position get(Object key)
      Get component position from the table.
      Parameters:
      key - the Object representing an AbstractData component or a BLOB specifying the encoded form of an open type or contained value (byte[] or a ByteStorage).
      Returns:
      the component's position.
    • put

      public void put(AbstractData component, AbstractData parent, int index, Position value)
      Put component's position into the table.
      Parameters:
      component - component's reference
      parent - component's parent reference
      index - an index inside component's parent
      value - the component's position information
    • get

      public Position get(AbstractData component, AbstractData parent, int index)
      Get component position from the table.
      Parameters:
      component - component's reference
      parent - component's parent reference
      index - an index inside component's parent
      Returns:
      the component's position.