|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.objsys.asn1j.runtime.Asn1MessageBufferBase com.objsys.asn1j.runtime.Asn1MessageBuffer com.objsys.asn1j.runtime.Asn1EncodeBuffer
public abstract class Asn1EncodeBuffer
This is the base class to specific encode buffer classes for the different types of encoding rules (BER, DER and PER).
Field Summary | |
---|---|
static int |
INITIAL_SIZE
This constant specifies the default initial size of the encode buffer. |
protected int |
mByteIndex
|
protected byte[] |
mData
|
Fields inherited from class com.objsys.asn1j.runtime.Asn1MessageBufferBase |
---|
context, mTypeCode |
Method Summary | |
---|---|
abstract void |
binDump(java.io.PrintStream out,
java.lang.String varName)
This method dumps the encoded message in a human-readable format showing a bit trace of all fields to the given print output stream. |
void |
binDump(java.lang.String varName)
This method invokes an overloaded version of binDump to dump the encoded message to standard output. |
protected void |
checkSize(int bytesRequired)
This method determines if the encode buffer can hold the requested number of bytes. |
abstract void |
copy(byte value)
This abstract method is used to copy a single byte to the encode buffer. |
abstract void |
copy(byte[] value)
This method copies multiple bytes to the encode buffer |
abstract byte[] |
getMsgCopy()
This method returns the encoded message in a byte array. |
abstract int |
getMsgLength()
This method returns the length (in bytes) of the encoded message component. |
void |
hexDump()
This method dumps the encoded message in hex/ascii format to the standard output stream. |
void |
hexDump(java.io.PrintStream out)
This method dumps the encoded message in hex/ascii format to the given print output stream. |
protected void |
initBuffer(int size)
|
abstract void |
reset()
This method resets the buffer to allow a new record to be encoded into it. |
int |
trimBitString(Asn1BitString bitstr)
This method will trim a BIT STRING for relevant encodings by removing all zero trailing bits. |
abstract void |
write(java.io.OutputStream out)
This method writes the encoded record to the given output stream. |
Methods inherited from class com.objsys.asn1j.runtime.Asn1MessageBuffer |
---|
addNamedEventHandler, getEventHandlerListCount, getInputStream, hasEventHandlers, invokeCharacters, invokeEndElement, invokeStartElement, setEventHandlerList |
Methods inherited from class com.objsys.asn1j.runtime.Asn1MessageBufferBase |
---|
getContext, hexDump, hexDump, setKey, setTypeCode |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int mByteIndex
protected byte[] mData
public static final int INITIAL_SIZE
Method Detail |
---|
public void binDump(java.lang.String varName)
public abstract void binDump(java.io.PrintStream out, java.lang.String varName)
protected void checkSize(int bytesRequired)
bytesRequired
- Number of required bytes.public int trimBitString(Asn1BitString bitstr)
bitstr
- An ASN.1 BIT STRING object.
public abstract void copy(byte value)
value
- The byte value to copypublic abstract void copy(byte[] value) throws Asn1Exception
value
- Array of bytes to copy to the encode buffer
Asn1Exception
public abstract byte[] getMsgCopy()
public abstract int getMsgLength()
public void hexDump()
public void hexDump(java.io.PrintStream out)
out
- Output stream object referenceprotected void initBuffer(int size)
public abstract void reset()
public abstract void write(java.io.OutputStream out) throws java.io.IOException
out
- Output stream to which record is to be written
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |