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 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.void
length
(ByteBuffer data, int length) Invoked when a length is parsed.void
skip
(ByteBuffer data) Invoked when a misencoded value is skipped.void
tag
(ByteBuffer data, BERTool.Tag tag) 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
Invoked when a tag is parsed.- 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
Invoked when a length is parsed.- 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
Invoked when END-OF-CONTENTS octets are detected.- Parameters:
data
- theByteBuffer
object that contains BER bytes that represent the EOC. The EOC bytes are delimited by theposition
andlimit
properties of theByteBuffer
.
-
content
Invoked when primitive contents octets are parsed.- 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
Invoked when a misencoded value is skipped.- Parameters:
data
- theByteBuffer
object that contains BER bytes that are skipped. The bytes are delimited by theposition
andlimit
properties of theByteBuffer
.
-
error
Invoked when an error occurs.- 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
void end_constructed()Invoked when a constructed encoding ends.
-