|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.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 | |
---|---|
protected int |
mByteIndex
|
protected byte[] |
mData
|
protected int |
mSizeIncrement
|
static int |
SIZE_INCREMENT
This constant specifies the initial size of the encode buffer and size it will be incremented by each time the buffer expands. |
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 sizeIncrement)
|
abstract void |
reset()
This method resets the buffer to allow a new record to be encoded into it. |
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 |
---|
getInputStream, hexDump, hexDump, setKey |
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
protected int mSizeIncrement
public static final int SIZE_INCREMENT
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 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 sizeIncrement)
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 |