Package com.oss.util

Class BERTool.ExtendedDumpBuilder

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

public static class BERTool.ExtendedDumpBuilder extends Object implements BERTool.DumpBuilder
Implements a BER encoding dump in extended dump format.
  • Field Details

    • DEFAULT_BYTES_PER_LINE

      public static final int DEFAULT_BYTES_PER_LINE
      The value that is used to initialize the bytesPerLine property.
      See Also:
  • Constructor Details

    • ExtendedDumpBuilder

      public ExtendedDumpBuilder(PrintStream sink)
      Constructs a new extended 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

    • getBytesPerLine

      public int getBytesPerLine()
      Gets the value of bytesPerLine.
      Returns:
      the value of bytesPerLine.
    • setBytesPerLine

      public BERTool.ExtendedDumpBuilder setBytesPerLine(int bytesPerLine)
      Sets the value of bytesPerLine.
      Parameters:
      bytesPerLine - the new value of bytesPerLine.
      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