Public Member Functions | Protected Member Functions

avro::OutputStream Class Reference

A no-copy output stream. More...

#include <Stream.hh>

List of all members.

Public Member Functions

virtual ~OutputStream ()
 Destructor.
virtual bool next (uint8_t **data, size_t *len)=0
 Returns a buffer that can be written into.
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.
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: