|
| | myBlob (ifstream &stream_) |
| |
| | 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_, const size_t length_) |
| |
| void | updateNoCopy (void *data_, const size_t length_, const Allocator allocator_=NewAllocator) |
| |
|
| enum | Allocator { MallocAllocator
, NewAllocator
} |
| |
Definition at line 24 of file readWriteBlob.cpp.
◆ myBlob()
| myBlob::myBlob |
( |
ifstream & | stream_ | ) |
|
|
inline |
Definition at line 28 of file readWriteBlob.cpp.
29 : Blob()
30 {
31 unsigned char* blobData = new unsigned char[100000];
32 char* c= reinterpret_cast<char *>(blobData);
33 size_t blobLen=0;
34 while( (blobLen< 100000) && stream_.get(*c) )
35 {
36 c++;
37 blobLen++;
38 }
39 if ((!stream_.eof()) || (blobLen == 0))
40 {
41 cout << "Failed to stream into blob!" << endl;
42 exit(1);
43 }
44
45
46 updateNoCopy( reinterpret_cast<unsigned char*>(blobData), blobLen,
47 Blob::NewAllocator );
48 }
The documentation for this class was generated from the following file: