Package com.oss.util

Class BERTool.DecomposedBuilder

java.lang.Object
com.oss.util.BERTool.DecomposedBuilder
All Implemented Interfaces:
BERTool.DumpBuilder
Enclosing class:
BERTool

public static class BERTool.DecomposedBuilder extends Object implements BERTool.DumpBuilder
Implements a BER encoding dump in decomposed-TLV format.
  • Constructor Details

    • DecomposedBuilder

      public DecomposedBuilder(PrintStream sink)
      Constructs a new decomposed-TLV dump builder, which is used to dump data from a specified byte buffer source to a specified print stream sink.
      Parameters:
      sink - the value of sink.
  • Method Details

    • getTruncationLimit

      public int getTruncationLimit()
      Gets the value of truncationLimit.
      Returns:
      the value of truncationLimit.
    • setTruncationLimit

      public BERTool.DecomposedBuilder setTruncationLimit(int truncationLimit)
      Sets the value of truncationLimit. Setting truncationLimit to zero or to a negative value disables truncation.
      Parameters:
      truncationLimit - the new value of truncationLimit.
      Returns:
      this object.
    • tag

      public void tag(ByteBuffer data, BERTool.Tag tag)
      Description copied from interface: BERTool.DumpBuilder
      Invoked when a tag is parsed.
      Specified by:
      tag in interface BERTool.DumpBuilder
      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

      public void length(ByteBuffer data, int length)
      Description copied from interface: BERTool.DumpBuilder
      Invoked when a length is parsed.
      Specified by:
      length in interface BERTool.DumpBuilder
      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

      public void eoc(ByteBuffer data)
      Description copied from interface: BERTool.DumpBuilder
      Invoked when END-OF-CONTENTS octets are detected.
      Specified by:
      eoc in interface BERTool.DumpBuilder
      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

      public void content(ByteBuffer data)
      Description copied from interface: BERTool.DumpBuilder
      Invoked when primitive contents octets are parsed.
      Specified by:
      content in interface BERTool.DumpBuilder
      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

      public void skip(ByteBuffer data)
      Description copied from interface: BERTool.DumpBuilder
      Invoked when a misencoded value is skipped.
      Specified by:
      skip in interface BERTool.DumpBuilder
      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

      public void error(ByteBuffer data, String message)
      Description copied from interface: BERTool.DumpBuilder
      Invoked when an error occurs.
      Specified by:
      error in interface BERTool.DumpBuilder
      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

      public void end_constructed()
      Description copied from interface: BERTool.DumpBuilder
      Invoked when a constructed encoding ends.
      Specified by:
      end_constructed in interface BERTool.DumpBuilder
    • begin_dump

      public void begin_dump()
      Description copied from interface: BERTool.DumpBuilder
      Invoked when a BER encoding processing starts, before any other method invocations.
      Specified by:
      begin_dump in interface BERTool.DumpBuilder
    • end_dump

      public void end_dump()
      Description copied from interface: BERTool.DumpBuilder
      Invoked when a BER encoding processing ends, before returning control to the caller.
      Specified by:
      end_dump in interface BERTool.DumpBuilder