public class Asn1DecodeBitBuffer extends Asn1DecodeBuffer implements Asn1BitMessageBuffer
| Modifier and Type | Field and Description | 
|---|---|
protected Asn1PerTraceHandler | 
mTraceHandler  | 
mByteCountcontext, mTypeCode| Constructor and Description | 
|---|
Asn1DecodeBitBuffer(byte[] msgdata)
This constructor creates a decode buffer object that
 references an encoded ASN.1 message. 
 | 
Asn1DecodeBitBuffer(java.io.InputStream istream)
This constructor creates a decode buffer object that
 references an encoded ASN.1 message. 
 | 
| 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 | 
binDump(java.lang.String varName)
This method invokes an overloaded version of binDump to dump
 the encoded message to standard output. 
 | 
void | 
byteAlign()
This methods byte-aligns the buffer. 
 | 
boolean | 
decodeBit()
This method decodes a single bit value. 
 | 
int | 
decodeBitsToInt(int nbits)
This method decodes bits from the input stream into a
 standard integer value. 
 | 
long | 
decodeBitsToLong(int nbits)
This method decodes bits from the input stream into a
 long integer value. 
 | 
void | 
decodeBitsToOctetArray(byte[] value,
                      int offset,
                      int nbits)
This method decodes bits from the input stream into an array
 of octets. 
 | 
void | 
decodeBitsToOctetArray(byte[] value,
                      int offset,
                      int bitOffset,
                      int nbits)
This method decodes bits from the input stream into an array
 of octets. 
 | 
int | 
getAvailableBits()
Return a number of bits that can definitely be read from this buffer
 without causing an end of buffer exception. 
 | 
long | 
getBitOffset()
This method returns the absolute offset to the current bit
 in the decode buffer. 
 | 
int | 
getBitOffsetInByte()
Return the bit offset, within the byte, of the next bit to be read. 
 | 
int | 
getMsgBitCnt()
This method returns the number of bits in the encoded PER
 message. 
 | 
Asn1PerTraceHandler | 
getTraceHandler()
This method will return a reference to the internal trace handler
 object used to trace the bit fields within a PER message. 
 | 
boolean | 
hasMoreBits()
This method returns true if there are more bits to be read from this
 buffer. 
 | 
void | 
mark(int readLimit)
This method is used to mark the current position in the input
 stream for retry processing. 
 | 
void | 
moveBitCursor(long offset)
This method moves the bit cursor to the given offset. 
 | 
int | 
readByte()
This method returns the next available 8-bit value
 from the input stream. 
 | 
void | 
reset()
This method is used to reset the current position in the input
 stream back to the location of the last 'mark' call. 
 | 
void | 
setInputStream(byte[] msgdata,
              int offset,
              int length)
This method will set the input stream from which data is read. 
 | 
void | 
skipBits(long bits)
Skip the given number of bits. 
 | 
addCaptureBuffer, capture, decodeIntValue, decodeOIDContents, decodeOIDContentsBig, decodeRelOIDContents, decodeRelOIDContentsBig, getByteCount, getInputStream, getLazyOpenTypeDecode, hexDump, init, read, read, read, read2Bytes, read4Bytes, removeCaptureBuffer, setLazyOpenTypeDecode, skip, skipOIDContents, skipRelOIDContentsaddNamedEventHandler, getEventHandlerListCount, hasEventHandlers, invokeCharacters, invokeEndElement, invokeStartElement, setEventHandlerListgetContext, hexDump, hexDump, setKey, setTypeCodeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetInputStreamprotected Asn1PerTraceHandler mTraceHandler
public Asn1DecodeBitBuffer(byte[] msgdata)
msgdata - Byte array containing an encoded ASN.1 message.public Asn1DecodeBitBuffer(java.io.InputStream istream)
istream - Input stream containing an encoded ASN.1 message.public Asn1PerTraceHandler getTraceHandler()
getTraceHandler in interface Asn1BitMessageBufferpublic void binDump(java.lang.String varName)
varName - Name of top-level message object variablepublic void binDump(java.io.PrintStream out,
                    java.lang.String varName)
out - PrintStream object to which output should be writtenvarName - Name of top-level message object variablepublic void byteAlign()
byteAlign in interface Asn1BitMessageBufferpublic boolean decodeBit()
                  throws Asn1EndOfBufferException,
                         java.io.IOException
Asn1EndOfBufferExceptionjava.io.IOExceptionpublic long decodeBitsToLong(int nbits)
                      throws Asn1Exception,
                             java.io.IOException
nbits - Number of bits to decodeAsn1Exceptionjava.io.IOExceptionpublic int decodeBitsToInt(int nbits)
                    throws Asn1Exception,
                           java.io.IOException
nbits - Number of bits to decodeAsn1Exceptionjava.io.IOExceptionpublic void decodeBitsToOctetArray(byte[] value,
                                   int offset,
                                   int nbits)
                            throws Asn1Exception,
                                   java.io.IOException
value - Octet array for decoded dataoffset - Starting byte offset into arraynbits - Number of bits to decodeAsn1Exceptionjava.io.IOExceptionpublic void decodeBitsToOctetArray(byte[] value,
                                   int offset,
                                   int bitOffset,
                                   int nbits)
                            throws Asn1Exception,
                                   java.io.IOException
value - Octet array for decoded dataoffset - Starting byte offset into arraybitOffset - Where in first byte the first bit goesnbits - Number of bits to decodeAsn1Exceptionjava.io.IOExceptionpublic final int getBitOffsetInByte()
public final long getBitOffset()
public final int getMsgBitCnt()
getMsgBitCnt in interface Asn1BitMessageBufferpublic final int getAvailableBits()
public final boolean hasMoreBits()
public void mark(int readLimit)
mark in class Asn1DecodeBufferreadLimit - Max number of bytes that can be read before mark
                  becomes invalid.public final void moveBitCursor(long offset)
                         throws Asn1EndOfBufferException,
                                java.io.IOException
offset - Absolute bit offset valueAsn1EndOfBufferExceptionjava.io.IOExceptionpublic final int readByte()
                   throws Asn1Exception,
                          java.io.IOException
readByte in class Asn1DecodeBufferAsn1Exceptionjava.io.IOExceptionpublic void reset()
reset in class Asn1DecodeBufferpublic final void setInputStream(byte[] msgdata,
                                 int offset,
                                 int length)
setInputStream in class Asn1DecodeBuffermsgdata - Byte array containing encoded message dataoffset - Starting offset of data in the byte arraylength - Length (in bytes) of the encoded datapublic final void skipBits(long bits)
                    throws java.io.IOException,
                           Asn1EndOfBufferException
bits - java.io.IOExceptionAsn1EndOfBufferException