76 unsigned long getLen()
const;
85 unsigned char getByte(
long pos = 0)
const;
94 uint16_t
getWord(
long pos = 0)
const;
103 uint32_t
getDWord(
long pos = 0)
const;
121 const char *
getString(
long pos = 0)
const;
162 void init(
const unsigned char * buf,
long len);
A generic container for an array of bytes.
const char * getString(long pos=0) const
Retrieves the characters at index pos.
void prependByte(unsigned char c)
Prepends a byte to the content of this instance.
uint16_t getWord(long pos=0) const
Retrieves the word at index pos.
~BufferStore()
Destroys a BufferStore instance.
uint32_t getDWord(long pos=0) const
Retrieves the dword at index pos.
void truncate(long newLen)
Truncates the buffer.
void prependWord(int w)
Prepends a word to the content of this instance.
void addByte(unsigned char c)
Appends a byte to the content of this instance.
void addWord(int w)
Appends a word to the content of this instance.
void addBuff(const BufferStore &b, long maxLen=-1)
Appends data to the content of this instance.
void addStringT(const char *s)
Appends a string to the content of this instance.
void addDWord(long dw)
Appends a dword to the content of this instance.
unsigned long getLen() const
Retrieves the length of a BufferStore.
BufferStore()
Constructs a new BufferStore.
void checkAllocd(long newLen)
bool empty() const
Tests if the BufferStore is empty.
unsigned char getByte(long pos=0) const
Retrieves the byte at index pos.
friend std::ostream & operator<<(std::ostream &s, const BufferStore &m)
Prints a dump of the content.
void addBytes(const unsigned char *buf, int len)
Appends data to the content of this instance.
BufferStore & operator=(const BufferStore &)
Copies a BufferStore.
void addString(const char *s)
Appends a string to the content of this instance.
int32_t getSDWord(long pos=0) const
Retrieves the signed dword at index pos.
void discardFirstBytes(int len=0)
Removes bytes from the start of the buffer.
void init()
Initializes the BufferStore.