Library: Data
Package: DataCore
Header: Poco/Data/BLOB.h
Representation of a Binary Large OBject.
A BLOB can hold arbitrary binary data. The maximum size depends on the underlying database.
The BLOBInputStream and BLOBOutputStream classes provide a convenient way to access the data in a BLOB.
Member Functions: appendRaw, assignRaw, begin, clear, compact, content, end, operator !=, operator =, operator ==, rawContent, size, swap
typedef std::vector < char >::const_iterator Iterator;
BLOB();
Creates an empty BLOB.
BLOB(
    const std::vector < char > & content
);
Creates the BLOB, content is deep-copied.
BLOB(
    const std::string & content
);
Creates a BLOB from a string.
Creates a BLOB by copying another one.
BLOB(
    const char * const pContent,
    std::size_t size
);
Creates the BLOB by deep-copying pContent.
~BLOB();
Destroys the BLOB.
 
 void appendRaw(
    const char * pChar,
    std::size_t count
);
Assigns raw content to internal storage.
 
 void assignRaw(
    const char * pChar,
    std::size_t count
);
Assigns raw content to internal storage.
 
 Iterator begin() const;
 
 void clear(
    bool doCompact = false
);
Clears the content of the blob. If doCompact is true, trims the excess capacity.
 
 void compact();
Trims the internal storage excess capacity.
 
 const std::vector < char > & content() const;
Returns the content.
 
 Iterator end() const;
 
 bool operator != (
    const BLOB & other
) const;
Compares for inequality BLOB by value.
BLOB & operator = (
    const BLOB & other
);
Assignment operator.
 
 bool operator == (
    const BLOB & other
) const;
Compares for equality BLOB by value.
 
 const char * rawContent() const;
Returns the raw content.
If the BLOB is empty, returns NULL.
 
 std::size_t size() const;
Returns the size of the BLOB in bytes.
 
 void swap(
    BLOB & other
);
Swaps the BLOB with another one.