public class Asn1BerEncodeBuffer extends Asn1EncodeByteBufferRev
mByteIndex, mDataINITIAL_SIZEcontext, mTypeCode| Constructor and Description |
|---|
Asn1BerEncodeBuffer()
This constructor creates a BER encode buffer object with the
default initial size.
|
Asn1BerEncodeBuffer(int size)
This constructor creates a BER encode buffer object with the
given initial size.
|
| Modifier and Type | Method and Description |
|---|---|
void |
binDump() |
void |
binDump(java.io.PrintStream out,
java.lang.String varName)
This method dumps the encoded message in a human-readable format
showing tags and contents to the given print output stream.
|
protected void |
checkSize(int bytesRequired)
This method determines if the encode buffer can hold the requested
number of bytes.
|
int |
encodeIdentifier(java.math.BigInteger ident)
This method encodes an ASN.1 identifier value such as the ones used
in a tags or object identifiers.
|
int |
encodeIdentifier(int ident)
This method encodes an ASN.1 identifier value such as the ones used
in a tags or object identifiers.
|
int |
encodeIntValue(long ivalue)
This method encodes an ASN.1 integer value's contents according
to the ASN.1 Basic Encoding Rules (BER)..
|
int |
encodeLength(int len)
This method encodes a length value.
|
int |
encodeTag(Asn1Tag tag)
This method encodes a tag value.
|
int |
encodeTag(short tagClass,
short tagForm,
int tagIdent)
This method encodes a tag value.
|
int |
encodeTagAndLength(Asn1Tag tag,
int len)
This method encodes both a tag and length value.
|
int |
encodeTagAndLength(short tagClass,
short tagForm,
int tagIDCode,
int len)
This overloaded version of encodeTagAndLength allows tag
value components to be specified instead of an Asn1Tag object
|
boolean |
isBER()
This method is used for testing encode rules type.
|
copy, copy, copy, copy, getByteArrayInputStream, getMsgCopy, getMsgLength, initBuffer, reset, toString, writebinDump, encodeIntSigned, encodeIntUnsigned, getInputStream, getMinimalOctetsSigned, getMinimalOctetsUnsigned, getOutputStream, hexDump, hexDumpaddNamedEventHandler, getEventHandlerListCount, hasEventHandlers, invokeCharacters, invokeEndElement, invokeStartElement, setEventHandlerListgetContext, hexDump, hexDump, setKey, setTypeCodepublic Asn1BerEncodeBuffer()
public Asn1BerEncodeBuffer(int size)
size - The initial size in bytes of an encode buffer.protected void checkSize(int bytesRequired)
Asn1EncodeByteBufferRevcheckSize in class Asn1EncodeByteBufferRevbytesRequired - Number of required bytes.public int encodeIdentifier(int ident)
ident - The identifier to be encoded.public int encodeIdentifier(java.math.BigInteger ident)
ident - The identifier to be encoded.public int encodeIntValue(long ivalue)
ivalue - Integer value to encodepublic int encodeLength(int len)
len - The length to be encoded.public int encodeTag(Asn1Tag tag)
tag - The tag to be encoded.public int encodeTag(short tagClass,
short tagForm,
int tagIdent)
tagClass - Tag class value (UNIV, APPL, CTXT, or PRIV)tagForm - Tag form value (PRIM or CONS)tagIdent - Tag identifer codepublic int encodeTagAndLength(Asn1Tag tag, int len)
tag - The tag to be encoded.len - The length to be encoded.public int encodeTagAndLength(short tagClass,
short tagForm,
int tagIDCode,
int len)
tagClass - The class of the tag to be encoded.tagForm - The form of the tag to be encoded.tagIDCode - The ID code of the tag to be encoded.len - The length to be encoded.public void binDump(java.io.PrintStream out,
java.lang.String varName)
binDump in class Asn1EncodeBufferout - stream to print to.varName - Variable name to include in output.public void binDump()
public boolean isBER()