A reference-counting, copy-on-write, threadsafe container for arbitrary binary data.
More...
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.
|
A reference-counting, copy-on-write, threadsafe container for arbitrary binary data.