Stream::MemoryBufferedStream Class Reference

#include <Streams.hpp>

Inheritance diagram for Stream::MemoryBufferedStream:

Stream::InputStream Stream::BaseStream List of all members.

Detailed Description

A buffered File-based input stream.


Public Member Functions

virtual uint32 currentPosition () const
 This method returns the position of the next byte that could be read from this stream.
virtual bool endReached () const
 This method returns true if the end of stream is reached.
virtual uint32 fullSize () const
 This method returns the stream length in byte, if known If the length is equal or higher than 2^32 - 1, the returned value is 0xfffffffe.
uint8 * getBuffer ()
 Get the buffer.
virtual bool goForward (const uint32 &skipAmount)
 Move the stream position forward of the given amount This should give the same results as setPosition(currentPosition() + value), but implementation can be faster for non-seek-able stream.
 MemoryBufferedStream (const InputStream &is)
 The only allowed constructor.
virtual uint32 read (void *const buffer, const uint32 &size) const throw ()
 Try to read the given amount of data to the specified buffer.
virtual bool setPosition (const uint32 &newPos)
 Try to seek to the given absolute position (return false if not supported).
 ~MemoryBufferedStream ()
 The only allowed destructor.


Constructor & Destructor Documentation

Stream::MemoryBufferedStream::MemoryBufferedStream ( const InputStream is  )  [inline]

The only allowed constructor.

Stream::MemoryBufferedStream::~MemoryBufferedStream (  )  [inline]

The only allowed destructor.


Member Function Documentation

virtual uint32 Stream::MemoryBufferedStream::currentPosition (  )  const [inline, virtual]

This method returns the position of the next byte that could be read from this stream.

Implements Stream::BaseStream.

virtual bool Stream::MemoryBufferedStream::endReached (  )  const [inline, virtual]

This method returns true if the end of stream is reached.

Implements Stream::BaseStream.

virtual uint32 Stream::MemoryBufferedStream::fullSize (  )  const [inline, virtual]

This method returns the stream length in byte, if known If the length is equal or higher than 2^32 - 1, the returned value is 0xfffffffe.

Implements Stream::BaseStream.

uint8* Stream::MemoryBufferedStream::getBuffer (  )  [inline]

Get the buffer.

virtual bool Stream::MemoryBufferedStream::goForward ( const uint32 &  skipAmount  )  [inline, virtual]

Move the stream position forward of the given amount This should give the same results as setPosition(currentPosition() + value), but implementation can be faster for non-seek-able stream.

Implements Stream::BaseStream.

virtual uint32 Stream::MemoryBufferedStream::read ( void *const   buffer,
const uint32 &  size 
) const throw () [inline, virtual]

Try to read the given amount of data to the specified buffer.

Returns:
the number of byte truly read (this method doesn't throw)

Implements Stream::InputStream.

virtual bool Stream::MemoryBufferedStream::setPosition ( const uint32 &  newPos  )  [inline, virtual]

Try to seek to the given absolute position (return false if not supported).

Implements Stream::BaseStream.


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

(C) An X-Ryl669 project 2007

This document describes Unlimited Zooming Interface source code. UZI stands for Unlimited Zooming Interface, and source code license is