avro::BufferReader Class Reference

Helper class for reading bytes from buffer without worrying about chunk boundaries. More...

#include <BufferReader.hh>

List of all members.

Public Types

typedef detail::data_type data_type
typedef detail::size_type size_type

Public Member Functions

 BufferReader (const InputBuffer &buf)
 BufferReader (const OutputBuffer &buf)
size_type bytesRemaining () const
 How many bytes are still not read from this buffer.
size_type bytesRead () const
 Read a block of data from the front of the buffer.
size_type read (data_type *data, size_type size)
 Read a block of data from the buffer.
bool read (std::string &str, size_type size)
 Read a block of data from the buffer.
template<typename T >
bool read (T &val)
 Read a single value from the buffer.
bool skip (size_type bytes)
 Skips a block of data from the buffer.
bool seek (size_type pos)
 Seek to a position in the buffer.
bool peek (char &val)
InputBuffer copyData (size_type bytes)

Detailed Description

Helper class for reading bytes from buffer without worrying about chunk boundaries.

May read from an InputBuffer or OutputBuffer.


Member Function Documentation

template<typename T >
bool avro::BufferReader::read ( T &  val  )  [inline]

Read a single value from the buffer.

The value must be a "fundamental" type, e.g. int, float, etc. (otherwise use the other writeTo tests).

References read().


The documentation for this class was generated from the following file:
Generated on Fri Oct 8 14:36:19 2010 for Avro C++ by  doxygen 1.6.3