Avro C++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Protected Member Functions | List of all members
avro::OutputStream Class Referenceabstract

A no-copy output stream. More...

#include <Stream.hh>

Inheritance diagram for avro::OutputStream:

Public Member Functions

virtual ~OutputStream ()
 Destructor.
 
virtual bool next (uint8_t **data, size_t *len)=0
 Returns a buffer that can be written into. More...
 
virtual void backup (size_t len)=0
 "Returns" back to the stream some of the buffer obtained from in the last call to next().
 
virtual uint64_t byteCount () const =0
 Number of bytes written so far into this stream. More...
 
virtual void flush ()=0
 Flushes any data remaining in the buffer to the stream's underlying store, if any.
 

Protected Member Functions

 OutputStream ()
 An empty constuctor.
 

Detailed Description

A no-copy output stream.

Member Function Documentation

virtual uint64_t avro::OutputStream::byteCount ( ) const
pure virtual

Number of bytes written so far into this stream.

The whole buffer returned by next() is assumed to be written unless some of it was retutned using backup().

virtual bool avro::OutputStream::next ( uint8_t **  data,
size_t *  len 
)
pure virtual

Returns a buffer that can be written into.

On successful return, data has the pointer to the buffer and len has the number of bytes available at data.

Referenced by avro::StreamWriter::more().


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