#include <Blob.h++>

Classes | |
| class | BlobBuf |
Public Member Functions | |
| Blob () throw () | |
| Construct a new, empty Blob. | |
| Blob (byte_t *data, size_t length, bool copy=true) | |
| Construct a new Blob from a byte array. | |
| Blob (const Blob &other) | |
| Copy constructor. | |
| Blob (const byte_t *data, size_t length) | |
| Construct a new Blob from a byte array. | |
| ~Blob () throw () | |
| Destructor. | |
| size_t | getLength () const throw () |
| Get the length of the Blob. | |
| size_t | length () const throw () |
| Get the length of the Blob. | |
| void | setLength (uint_t length) |
| Set the length of the Blob. | |
| byte_t * | getData () throw () |
| Get a pointer to the beginning of the data in the Blob. | |
| const byte_t * | getData () const throw () |
| Get a pointer to the beginning of the data in the Blob. | |
| Blob & | clear () |
| Clear the Blob. | |
| bool | isEmpty () const throw () |
| Test if the Blob is empty. | |
| bool | isNull () const throw () |
| Test if the Blob is null. | |
| Blob & | append (const byte_t *data, size_t len) |
| Append a byte array to the Blob. | |
| Blob & | append (const char *str, size_t len=0) |
| Append a character array to the Blob. | |
| int | indexOf (byte_t b, uint_t fromIndex=0) const throw () |
| Find the first occurrence of a given byte in the Blob. | |
| int | indexOf (const byte_t *buf, size_t len, uint_t fromIndex=0) const throw () |
| Find the first occurrence of a given byte sequence in the Blob. | |
| int | lastIndexOf (byte_t b, uint_t fromIndex=END) const throw () |
| Find the last occurrence of a given byte in the Blob. | |
| int | lastIndexOf (const byte_t *buf, size_t len, uint_t fromIndex=END) const throw () |
| Find the last occurrence of a given byte sequence in the Blob. | |
| bool | contains (byte_t b) const throw () |
| Determine if the Blob contains a given byte. | |
| int | compareTo (const Blob &other) const throw () |
| Compare this Blob to another. | |
| Blob & | operator= (const Blob &other) |
| Assignment operator. | |
| byte_t & | operator[] (int index) throw (OutOfBoundsException) |
| Array index operator. | |
| byte_t | operator[] (int index) const throw (OutOfBoundsException) |
| Array index operator. | |
| bool | operator! () const throw () |
| Unary NOT operator. | |
| Blob & | operator+= (byte_t b) |
| Append a byte onto the end of the Blob. | |
| Blob & | operator+= (int v) |
| Append a value onto the end of the Blob. | |
| Blob & | operator+= (const char *str) |
| Append a character string onto the end of the Blob. | |
| Blob & | operator+= (const Blob &blob) |
| Append (a copy of) the contents of another Blob onto the end of the Blob. | |
| Blob & | operator<< (byte_t val) |
| Append operator. | |
| Blob & | operator<< (int val) |
| Append operator. | |
| Blob & | operator<< (const char *str) |
| Append operator. | |
| uint_t | hash (uint_t modulo=256) const throw () |
| Compute a hashcode for the Blob. | |
Static Public Attributes | |
| static const Blob | null |
| The null Blob. | |
| static const uint_t | END = 0xFFFFFFFF |
| A pseudo-index indicating the end of the blob. | |
Construct a new Blob from a byte array.
| data | The array to copy. | |
| length | The length of the array. |
| ~Blob | ( | ) | throw () |
Destructor.
| Blob & append | ( | const char * | str, | |
| size_t | len = 0 | |||
| ) |
Append a character array to the Blob.
| str | The array to append. | |
| len | The number of characters from the string to append, or 0 to append the entire string (up to, but not including, the NUL terminator). |
| int compareTo | ( | const Blob & | other | ) | const throw () |
| bool contains | ( | byte_t | b | ) | const throw () [inline] |
| const byte_t* getData | ( | ) | const throw () [inline] |
Get a pointer to the beginning of the data in the Blob.
| size_t getLength | ( | ) | const throw () [inline] |
Compute a hashcode for the Blob.
| modulo | The desired range for the hashcode. |
Find the first occurrence of a given byte sequence in the Blob.
| buf | The buffer containing the byte sequence to search for. | |
| len | The length of the sequence. | |
| fromIndex | The start index from which to begin searching. |
Find the first occurrence of a given byte in the Blob.
| b | The byte to search for. | |
| fromIndex | The start index from which to begin searching. |
| bool isEmpty | ( | ) | const throw () [inline] |
| bool isNull | ( | ) | const throw () [inline] |
Find the last occurrence of a given byte sequence in the Blob.
| buf | The buffer containing the byte sequence to search for. | |
| len | The length of the sequence. | |
| fromIndex | The index from which to begin searching backwards, or END to start at the end of the Blob. |
| size_t length | ( | ) | const throw () [inline] |
| bool operator! | ( | ) | const throw () [inline] |
| Blob& operator+= | ( | const char * | str | ) | [inline] |
| Blob& operator+= | ( | int | v | ) | [inline] |
Append a value onto the end of the Blob.
| v | The value to append. The value will be converted to a byte, which will then be appended to the blob. |
| Blob& operator<< | ( | const char * | str | ) | [inline] |
Append operator.
| Blob& operator<< | ( | int | val | ) | [inline] |
Append operator.
| byte_t operator[] | ( | int | index | ) | const throw (OutOfBoundsException) |
Array index operator.
Obtain a copy of the byte at the given offset in the Blob.
| index | The index. |
| OutOfBoundsException | If index is out of range. |
| byte_t & operator[] | ( | int | index | ) | throw (OutOfBoundsException) |
Array index operator.
Obtain a reference to the byte at the given offset in the Blob.
| index | The index. |
| OutOfBoundsException | If index is out of range. |
| void setLength | ( | uint_t | length | ) |
1.5.9