#include <BerDecoder.h>
◆ BerDecoder()
keyple::common::BerDecoder::BerDecoder |
( |
std::vector< char > |
buf, |
|
|
int |
offset, |
|
|
int |
bufsize |
|
) |
| |
|
inline |
Creates a BER decoder that reads bytes from the specified buffer.
◆ parseByte()
int keyple::common::BerDecoder::parseByte |
( |
| ) |
|
|
inline |
Parses the next byte in this BER buffer.
- Returns
- The byte parsed.
◆ parseLength()
int keyple::common::BerDecoder::parseLength |
( |
| ) |
|
|
inline |
Parses a possibly variable length field.
◆ parseOctetString()
std::vector<char> keyple::common::BerDecoder::parseOctetString |
( |
int |
tag, |
|
|
std::vector< int > |
rlen |
|
) |
| |
|
inline |
Parses an octet string of a given type(tag) from this BER buffer.
BER Binary Data of type "tag" ::= tag length {byte}*
- Parameters
-
tag | The tag to look for. |
rlen | An array for returning the relative parsed position. If null, the relative parsed position is not returned. |
- Returns
- A non-null array containing the octet string.
- Exceptions
-
DecodeException | If the next byte in the BER buffer is not tag , or if length specified in the BER buffer exceeds the number of bytes left in the buffer. |
◆ peekByte()
int keyple::common::BerDecoder::peekByte |
( |
| ) |
|
|
inline |
Returns the next byte in this BER buffer without consuming it.
- Returns
- The next byte.
The documentation for this class was generated from the following file: