Package com.oss.util
Class BERTool.ExtendedDumpBuilder
java.lang.Object
com.oss.util.BERTool.ExtendedDumpBuilder
- All Implemented Interfaces:
BERTool.DumpBuilder
- Enclosing class:
- BERTool
Implements a BER encoding dump in extended dump format.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The value that is used to initialize the bytesPerLine property. -
Constructor Summary
ConstructorDescriptionConstructs a new extended dump builder, which is used to dump data from a specified byte buffer source to a specified print stream sink. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Invoked when a BER encoding processing starts, before any other method invocations.void
content
(ByteBuffer data) Invoked when primitive contents octets are parsed.void
Invoked when a constructed encoding ends.void
end_dump()
Invoked when a BER encoding processing ends, before returning control to the caller.void
eoc
(ByteBuffer data) Invoked when END-OF-CONTENTS octets are detected.void
error
(ByteBuffer data, String message) Invoked when an error occurs.int
Gets the value of bytesPerLine.void
length
(ByteBuffer data, int length) Invoked when a length is parsed.setBytesPerLine
(int bytesPerLine) Sets the value of bytesPerLine.void
skip
(ByteBuffer data) Invoked when a misencoded value is skipped.void
tag
(ByteBuffer data, BERTool.Tag tag) Invoked when a tag is parsed.
-
Field Details
-
DEFAULT_BYTES_PER_LINE
public static final int DEFAULT_BYTES_PER_LINEThe value that is used to initialize the bytesPerLine property.- See Also:
-
-
Constructor Details
-
ExtendedDumpBuilder
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
Sets the value of bytesPerLine.- Parameters:
bytesPerLine
- the new value of bytesPerLine.- Returns:
- this object.
-
tag
Description copied from interface:BERTool.DumpBuilder
Invoked when a tag is parsed.- Specified by:
tag
in interfaceBERTool.DumpBuilder
- Parameters:
data
- theByteBuffer
object that contains BER bytes that represent a tag encoding. The encoding is delimited by theposition
andlimit
properties of theByteBuffer
.tag
- the decoded tag.
-
length
Description copied from interface:BERTool.DumpBuilder
Invoked when a length is parsed.- Specified by:
length
in interfaceBERTool.DumpBuilder
- Parameters:
data
- theByteBuffer
object that contains BER bytes that represent a length encoding. The encoding is delimited by theposition
andlimit
properties of theByteBuffer
.length
- the decoded length or -1 for indefinite length encodings.
-
eoc
Description copied from interface:BERTool.DumpBuilder
Invoked when END-OF-CONTENTS octets are detected.- Specified by:
eoc
in interfaceBERTool.DumpBuilder
- Parameters:
data
- theByteBuffer
object that contains BER bytes that represent the EOC. The EOC bytes are delimited by theposition
andlimit
properties of theByteBuffer
.
-
content
Description copied from interface:BERTool.DumpBuilder
Invoked when primitive contents octets are parsed.- Specified by:
content
in interfaceBERTool.DumpBuilder
- Parameters:
data
- theByteBuffer
object that contains BER bytes that represent primitive content octets. The primitive contents octets are delimited by theposition
andlimit
properties of theByteBuffer
.
-
skip
Description copied from interface:BERTool.DumpBuilder
Invoked when a misencoded value is skipped.- Specified by:
skip
in interfaceBERTool.DumpBuilder
- Parameters:
data
- theByteBuffer
object that contains BER bytes that are skipped. The bytes are delimited by theposition
andlimit
properties of theByteBuffer
.
-
error
Description copied from interface:BERTool.DumpBuilder
Invoked when an error occurs.- Specified by:
error
in interfaceBERTool.DumpBuilder
- Parameters:
data
- theByteBuffer
object that contains erroneous BER data. Theposition
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 interfaceBERTool.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 interfaceBERTool.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 interfaceBERTool.DumpBuilder
-