Public Member Functions | Protected Member Functions

avro::InputStream Class Reference

A no-copy input stream. More...

#include <Stream.hh>

List of all members.

Public Member Functions

virtual ~InputStream ()
 Destructor.
virtual bool next (const uint8_t **data, size_t *len)=0
 Returns some of available data.
virtual void backup (size_t len)=0
 "Returns" back some of the data to the stream.
virtual void skip (size_t len)=0
 Skips number of bytes specified by len.
virtual size_t byteCount () const =0
 Returns the number of bytes read from this stream so far.

Protected Member Functions

 InputStream ()
 An empty constuctor.

Detailed Description

A no-copy input stream.


Member Function Documentation

virtual void avro::InputStream::backup ( size_t  len  )  [pure virtual]

"Returns" back some of the data to the stream.

The returned data must be less than what was obtained in the last call to next().

Referenced by avro::StreamReader::reset().

virtual size_t avro::InputStream::byteCount (  )  const [pure virtual]

Returns the number of bytes read from this stream so far.

All the bytes made available through next are considered to be used unless, retutned back using backup.

virtual bool avro::InputStream::next ( const uint8_t **  data,
size_t *  len 
) [pure virtual]

Returns some of available data.

Returns true if some data is available, false if no more data is available or an error has occurred.

Referenced by avro::copy(), and avro::StreamReader::fill().


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