Couchbase Lite C++
Couchbase Lite C++ API
Loading...
Searching...
No Matches
cbl::BlobWriteStream Class Reference

A stream for writing a new blob to the database. More...

#include <cbl++/Blob.hh>

Public Member Functions

 BlobWriteStream (Database db)
 Create a stream to write a new blob to the database.
 ~BlobWriteStream ()
 Closes the blob-writing stream if it has not been handed off to a Blob constructor.
void write (fleece::slice data)
 Writes data to a new blob.
void write (const void *src, size_t length)
 Writes data to a new blob.

Friends

class Blob

Detailed Description

A stream for writing a new blob to the database.

Constructor & Destructor Documentation

◆ BlobWriteStream()

cbl::BlobWriteStream::BlobWriteStream ( Database db)
inline

Create a stream to write a new blob to the database.

◆ ~BlobWriteStream()

cbl::BlobWriteStream::~BlobWriteStream ( )
inline

Closes the blob-writing stream if it has not been handed off to a Blob constructor.

Safe to call after the stream has been consumed by a Blob.

Member Function Documentation

◆ write() [1/2]

void cbl::BlobWriteStream::write ( const void * src,
size_t length )
inline

Writes data to a new blob.

Parameters
srcThe address of the data to write.
lengthThe length of the data to write.

◆ write() [2/2]

void cbl::BlobWriteStream::write ( fleece::slice data)
inline

Writes data to a new blob.

Parameters
dataThe data to write.

◆ Blob

friend class Blob
friend

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