Loading...
Searching...
No Matches
myBlob Class Reference
Inheritance diagram for myBlob:

## Public Member Functions

| myBlob (ifstream &stream_)
Public Member Functions inherited from Magick::Blob
| Blob (const void *data_, const size_t length_)
| Blob (const Blob &blob_)
Blob & | operator= (const Blob &blob_)
void | base64 (const std::string base64_)
std::string | base64 (void) const
const void * | data (void) const
size_t | length (void) const
void | update (const void *data_, size_t length_)
void | updateNoCopy (void *data_, size_t length_, Allocator allocator_=NewAllocator)

## Additional Inherited Members

Public Types inherited from Magick::Blob
enum | Allocator { MallocAllocator , NewAllocator }

## Detailed Description

Definition at line 24 of file readWriteBlob.cpp.

## Constructor & Destructor Documentation

## myBlob()

myBlob::myBlob | ( | ifstream & | stream_ | ) |

inline

Definition at line 28 of file readWriteBlob.cpp.

: Blob()
{
unsigned char* blobData = new unsigned char[100000];
char* c= reinterpret_cast<char *>(blobData);
size_t blobLen=0;
while( (blobLen< 100000) && stream_.get(*c) )
{
c++;
blobLen++;
}
if ((!stream_.eof()) || (blobLen == 0))
{
cout << "Failed to stream into blob!" << endl;
exit(1);
}
// Insert data into blob
updateNoCopy( reinterpret_cast<unsigned char*>(blobData), blobLen,
Blob::NewAllocator );
}

The documentation for this class was generated from the following file:

- readWriteBlob.cpp