public class Asn1XerEncodeBuffer extends Asn1EncodeByteBuffer implements Asn1XerEncoder
mByteIndex, mDataINITIAL_SIZEcontext, mTypeCode| Constructor and Description | 
|---|
Asn1XerEncodeBuffer()
The default constructor creates an XER encode buffer object with
 the default initial size and canonical set to false. 
 | 
Asn1XerEncodeBuffer(boolean canonical)
The parameterized constructor creates an XER encode buffer object
 with default initial size and canonical set to the given values. 
 | 
Asn1XerEncodeBuffer(boolean canonical,
                   int size)
The parameterized constructor creates an XER encode buffer object
 with initial size increment and canonical set to the given values. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
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 | 
copy(java.lang.String value)
This method copies a character string to the encode buffer. 
 | 
void | 
decrLevel()
This method decrements the element nesting level counter. 
 | 
void | 
encodeBinStrValue(byte[] bits,
                 int nbits)
This method encodes XML binary string data 
 | 
void | 
encodeByte(byte value)
This method is used to encode a single byte to the encode buffer. 
 | 
void | 
encodeData(java.lang.String value)
This method encodes XML string data 
 | 
void | 
encodeEmptyElement(java.lang.String elemName)
This method encodes an XML empty element tag 
 | 
void | 
encodeEndDocument()
This method encodes standard trailor information at the end
 of the XML document. 
 | 
void | 
encodeEndElement(java.lang.String elemName)
This method encodes an XML end element tag 
 | 
void | 
encodeHexStrValue(byte[] data)
This method encodes XML hexadecimal string data 
 | 
void | 
encodeNamedValue(java.lang.String valueName,
                java.lang.String elemName)
This method encodes an XML named value (with start and end tags) 
 | 
void | 
encodeNamedValueElement(java.lang.String elemName)
This method encodes an XML named value element tag 
 | 
void | 
encodeRealValue(double value,
               java.lang.String elemName)
This method encodes an XML REAL (double) value (with start and end tags). 
 | 
void | 
encodeStartDocument()
This method encodes standard header information at the beginning
 of the XML document. 
 | 
void | 
encodeStartElement(java.lang.String elemName)
This method encodes an XML start element tag 
 | 
int | 
getState()
This method gets the state of the buffer. 
 | 
void | 
incrLevel()
This method increments the element nesting level counter. 
 | 
void | 
indent()
This methods indents by adding a new-line followed by whitespace
 corresponding to the current nesting level to the encode buffer. 
 | 
boolean | 
isCanonical()
Return true if the encoder has been put into canonical mode. 
 | 
void | 
setCanonical(boolean value)
This method sets the canonical encoding flag to the given value. 
 | 
void | 
setState(int stat)
This method sets the state of the buffer. 
 | 
checkSize, copy, copy, copy, copyUnsafe, getBuffer, getByteArrayInputStream, getMsgCopy, getMsgLength, initBuffer, reset, writebinDump, encodeIntSigned, encodeIntUnsigned, getInputStream, getMinimalOctetsSigned, getMinimalOctetsUnsigned, getOutputStream, hexDump, hexDumpaddNamedEventHandler, getEventHandlerListCount, hasEventHandlers, invokeCharacters, invokeEndElement, invokeStartElement, setEventHandlerListgetContext, hexDump, hexDump, setKey, setTypeCodeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcopy, copy, copy, getContextpublic Asn1XerEncodeBuffer()
public Asn1XerEncodeBuffer(boolean canonical)
canonical - Boolean indicating a canonical or non-canonical
 encoding should be produced as defined in the X.693 standard.public Asn1XerEncodeBuffer(boolean canonical,
                           int size)
canonical - Boolean indicating a canonical or non-canonical
 encoding should be produced as defined in the X.693 standard.size - The initial size in bytes of an encode buffer. If
 this parameter is set to zero, the default size will be used.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 copy(java.lang.String value)
          throws Asn1Exception
copy in interface Asn1XmlXerEncodervalue - The string value to copyAsn1Exception - Thrown, if operation is failed.public void decrLevel()
decrLevel in interface Asn1XmlXerEncoderpublic void encodeByte(byte value)
value - The byte value to copypublic void encodeData(java.lang.String value)
                throws Asn1Exception
encodeData in interface Asn1XmlXerEncodervalue - String value to encodeAsn1Exception - Thrown, if operation is failed.public void encodeBinStrValue(byte[] bits,
                              int nbits)
                       throws Asn1Exception
encodeBinStrValue in interface Asn1XmlXerEncoderbits - Bit string to encodeAsn1Exception - Thrown, if operation is failed.public void encodeHexStrValue(byte[] data)
                       throws Asn1Exception
encodeHexStrValue in interface Asn1XmlXerEncoderdata - Data to encodeAsn1Exception - Thrown, if operation is failed.public void encodeEndDocument()
                       throws Asn1Exception
encodeEndDocument in interface Asn1XmlXerEncoderAsn1Exception - Thrown, if operation is failed.public void encodeEndElement(java.lang.String elemName)
                      throws Asn1Exception
encodeEndElement in interface Asn1XerEncoderelemName - The name of element.Asn1Exception - Thrown, if operation is failed.public void encodeStartDocument()
                         throws Asn1Exception
encodeStartDocument in interface Asn1XmlXerEncoderAsn1Exception - Thrown, if operation is failed.public void encodeStartElement(java.lang.String elemName)
                        throws Asn1Exception
encodeStartElement in interface Asn1XerEncoderelemName - The name of element.Asn1Exception - Thrown, if operation is failed.public void encodeEmptyElement(java.lang.String elemName)
                        throws Asn1Exception
encodeEmptyElement in interface Asn1XerEncoderelemName - The name of element.Asn1Exception - Thrown, if operation is failed.public void encodeNamedValueElement(java.lang.String elemName)
                             throws Asn1Exception
encodeNamedValueElement in interface Asn1XmlXerEncoderelemName - The name of element.Asn1Exception - Thrown, if operation is failed.public void encodeRealValue(double value,
                            java.lang.String elemName)
                     throws java.io.IOException,
                            Asn1Exception
encodeRealValue in interface Asn1XerEncodervalue - The value to be encoded.elemName - The name of element. If null, then start and end
                        tags won't be encoded.java.io.IOException - If I/O error occurs.Asn1Exception - Thrown, if operation is failed.public int getState()
getState in interface Asn1XerEncoderpublic void incrLevel()
incrLevel in interface Asn1XmlXerEncoderpublic void indent()
            throws Asn1Exception
indent in interface Asn1XmlXerEncoderAsn1Exception - Thrown, if operation is failed.public boolean isCanonical()
Asn1XmlXerEncoderisCanonical in interface Asn1XmlXerEncoderAsn1XmlXerEncoderpublic void setCanonical(boolean value)
value - Canonical encoding flag.public void setState(int stat)
setState in interface Asn1XerEncoderstat - Buffer Statpublic void encodeNamedValue(java.lang.String valueName,
                             java.lang.String elemName)
                      throws Asn1Exception
encodeNamedValue in interface Asn1XerEncodervalueName - The name of value.elemName - The name of element.Asn1Exception - Thrown, if operation is failed.