FDO API Reference Feature Data Objects
Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

FdoIoBufferStream Class Reference

#include <BufferStream.h>

Inherits FdoIoStream.

Inheritance diagram for FdoIoBufferStream:

[legend]
List of all members.

Detailed Description

DOXYGEN-IGNORE

Definition at line 27 of file BufferStream.h.


Public Member Functions

virtual FdoInt64 GetIndex ()
 gets the current position for the stream.
virtual FdoInt64 GetLength ()
 gets the current length of the stream.
virtual FdoSize Read (FdoByte *buffer, FdoSize count)
 FdoIoStream implementations.
virtual void Reset ()
 sets the position to the start of the stream.
virtual void SetLength (FdoInt64 length)
 truncates the stream to the indicated length.
virtual void Skip (FdoInt64 offset)
 skips over part of the stream.
virtual void Write (FdoIoStream *stream, FdoSize count=0)
 reads the number of bytes from the given stream, and writes them to this stream.
virtual void Write (FdoByte *buffer, FdoSize count)
 writes the number of bytes indicated by count, from the given buffer, to the stream. The current position is moved ahead by the number of bytes written.

Static Public Member Functions

FdoIoBufferStreamCreate (FdoSize size)
 Creates a new buffer of the given size and wraps a stream around it.
FdoIoBufferStreamCreate (FdoByte *buffer, FdoSize size)
 Creates a stream around the given buffer.

Protected Member Functions

 FdoIoBufferStream (FdoSize size=4096)
 FdoIoBufferStream (FdoByte *buffer, FdoSize size)
virtual ~FdoIoBufferStream (void)

Constructor & Destructor Documentation

FdoIoBufferStream::FdoIoBufferStream FdoByte buffer,
FdoSize  size
[protected]
 

FdoIoBufferStream::FdoIoBufferStream FdoSize  size = 4096  )  [protected]
 

virtual FdoIoBufferStream::~FdoIoBufferStream void   )  [protected, virtual]
 


Member Function Documentation

FdoIoBufferStream* FdoIoBufferStream::Create FdoSize  size  )  [static]
 

Creates a new buffer of the given size and wraps a stream around it.

FdoIoBufferStream* FdoIoBufferStream::Create FdoByte buffer,
FdoSize  size
[static]
 

Creates a stream around the given buffer.

virtual FdoInt64 FdoIoBufferStream::GetIndex  )  [inline, virtual]
 

gets the current position for the stream.

Returns:
Returns the position in bytes from the start. When 0, the the position is at the start of the stream. When GetIndex() == GetLength() the position is at the end of the stream.

Implements FdoIoStream.

Definition at line 46 of file BufferStream.h.

References FdoInt64.

virtual FdoInt64 FdoIoBufferStream::GetLength  )  [inline, virtual]
 

gets the current length of the stream.

Returns:
Returns the length in bytes. Returns -1 if the length is unknown or undefined.

Implements FdoIoStream.

Definition at line 42 of file BufferStream.h.

References FdoInt64.

virtual FdoSize FdoIoBufferStream::Read FdoByte buffer,
FdoSize  count
[virtual]
 

FdoIoStream implementations.

Implements FdoIoStream.

virtual void FdoIoBufferStream::Reset  )  [virtual]
 

sets the position to the start of the stream.

Implements FdoIoStream.

virtual void FdoIoBufferStream::SetLength FdoInt64  length  )  [virtual]
 

truncates the stream to the indicated length.

Parameters:
length Input the new length (in bytes) for the stream. If this is longer than the current stream length then the stream's length is not changed.

Implements FdoIoStream.

virtual void FdoIoBufferStream::Skip FdoInt64  offset  )  [virtual]
 

skips over part of the stream.

Parameters:
offset The number of bytes to skip. if position then the current position is moved forward. If negative, the position is moved backward. The position will remain between the start and end of the stream. The position is set to the end of the stream if the given offset would put it past the end. Similarily, the position is set to the start if the offset would put it before the start.

Implements FdoIoStream.

virtual void FdoIoBufferStream::Write FdoIoStream stream,
FdoSize  count = 0
[virtual]
 

reads the number of bytes from the given stream, and writes them to this stream.

Parameters:
stream Input write from this buffer
count Input the maximum number of bytes to read and write. When 0, all remaining bytes are read from the given stream.

Implements FdoIoStream.

virtual void FdoIoBufferStream::Write FdoByte buffer,
FdoSize  count
[virtual]
 

writes the number of bytes indicated by count, from the given buffer, to the stream. The current position is moved ahead by the number of bytes written.

Parameters:
buffer Intput write from this buffer
count Input number of bytes to write
Note:
Write will overwrite some of the contents of the stream if the current position is not at the end of the stream.

Implements FdoIoStream.


The documentation for this class was generated from the following file:
Comments or suggestions? Send us feedback.