Package com.oss.util

Interface BERTool.DumpBuilder

All Known Implementing Classes:
BERTool.DecomposedBuilder, BERTool.ExtendedDumpBuilder, BERTool.HexBuilder, BERTool.SyntaxBuilder
Enclosing class:
BERTool

public static interface BERTool.DumpBuilder
Defines methods that are invoked by the BERTool.dumpTLV(ByteBuffer, DumpBuilder) BER parser.

Note: The ByteBuffer object that is passed to a method of the DumpBuilder is invalidated after the method returns to the caller. If the implementation needs to use the object between calls, it must obtain and save its copy using the duplicate() method of the ByteBuffer.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Invoked when a BER encoding processing starts, before any other method invocations.
    void
    Invoked when primitive contents octets are parsed.
    void
    Invoked when a constructed encoding ends.
    void
    Invoked when a BER encoding processing ends, before returning control to the caller.
    void
    Invoked when END-OF-CONTENTS octets are detected.
    void
    error(ByteBuffer data, String message)
    Invoked when an error occurs.
    void
    length(ByteBuffer data, int length)
    Invoked when a length is parsed.
    void
    Invoked when a misencoded value is skipped.
    void
    Invoked when a tag is parsed.
  • Method Details

    • begin_dump

      void begin_dump()
      Invoked when a BER encoding processing starts, before any other method invocations.
    • end_dump

      void end_dump()
      Invoked when a BER encoding processing ends, before returning control to the caller.
    • tag

      void tag(ByteBuffer data, BERTool.Tag tag)
      Invoked when a tag is parsed.
      Parameters:
      data - the ByteBuffer object that contains BER bytes that represent a tag encoding. The encoding is delimited by the position and limit properties of the ByteBuffer.
      tag - the decoded tag.
    • length

      void length(ByteBuffer data, int length)
      Invoked when a length is parsed.
      Parameters:
      data - the ByteBuffer object that contains BER bytes that represent a length encoding. The encoding is delimited by the position and limit properties of the ByteBuffer.
      length - the decoded length or -1 for indefinite length encodings.
    • eoc

      void eoc(ByteBuffer data)
      Invoked when END-OF-CONTENTS octets are detected.
      Parameters:
      data - the ByteBuffer object that contains BER bytes that represent the EOC. The EOC bytes are delimited by the position and limit properties of the ByteBuffer.
    • content

      void content(ByteBuffer data)
      Invoked when primitive contents octets are parsed.
      Parameters:
      data - the ByteBuffer object that contains BER bytes that represent primitive content octets. The primitive contents octets are delimited by the position and limit properties of the ByteBuffer.
    • skip

      void skip(ByteBuffer data)
      Invoked when a misencoded value is skipped.
      Parameters:
      data - the ByteBuffer object that contains BER bytes that are skipped. The bytes are delimited by the position and limit properties of the ByteBuffer.
    • error

      void error(ByteBuffer data, String message)
      Invoked when an error occurs.
      Parameters:
      data - the ByteBuffer object that contains erroneous BER data. The position property specifies the position of the error in the encoded data.
      message - the error message.
    • end_constructed

      void end_constructed()
      Invoked when a constructed encoding ends.