Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

VCF::TextInputStream Class Reference

TextInputStream is used for interpreting data from another stream as text. More...

#include <TextInputStream.h>

Inheritance diagram for VCF::TextInputStream:

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

Public Member Functions

 TextInputStream (InputStream *inStream)
virtual ~TextInputStream ()
virtual void seek (const uint64 &offset, const SeekType &offsetFrom)
virtual uint64 getSize ()
 returns the size of the stream.
virtual char * getBuffer ()
 returns a pointer to the buffer that holds the stream memory
virtual uint64 read (unsigned char *bytesToRead, uint64 sizeOfBytes)
virtual void read (short &val)
 all numbers are written out as the number converted to text, followed by a space character ( ' ' ), so the value 2 becomes "2 "
virtual void read (long &val)
virtual void read (int &val)
virtual void read (bool &val)
virtual void read (float &val)
virtual void read (double &val)
virtual void read (String &val)
void init ()
void readLine (String &line)
virtual bool isEOS ()
virtual uint64 getCurrentSeekPos ()
 this is a global offset from the beggining of the stream

Detailed Description

TextInputStream is used for interpreting data from another stream as text.

This assumes the data in the stream was originally written as text. For example, a FileStream that has been used to write a binary file, and is then passed into a new instance of TextInputStream to read the same file, will cause unpredicatable results in the decoding of the stream, since the TextInputStream is taking advantage of certain layout assumptions in how the source stream is organized. So consider yourself warned !


Constructor & Destructor Documentation

VCF::TextInputStream::TextInputStream InputStream inStream  ) 
 

virtual VCF::TextInputStream::~TextInputStream  )  [virtual]
 


Member Function Documentation

virtual char* VCF::TextInputStream::getBuffer  )  [virtual]
 

returns a pointer to the buffer that holds the stream memory

Implements VCF::Stream.

virtual uint64 VCF::TextInputStream::getCurrentSeekPos  )  [virtual]
 

this is a global offset from the beggining of the stream

Implements VCF::Stream.

virtual uint64 VCF::TextInputStream::getSize  )  [virtual]
 

returns the size of the stream.

The size represents the number of bytes that have been written, or read to/from the stream

Implements VCF::Stream.

void VCF::TextInputStream::init  ) 
 

virtual bool VCF::TextInputStream::isEOS  )  [inline, virtual]
 

Implements VCF::InputStream.

virtual void VCF::TextInputStream::read String val  )  [virtual]
 

Reimplemented from VCF::InputStream.

virtual void VCF::TextInputStream::read double &  val  )  [virtual]
 

Reimplemented from VCF::InputStream.

virtual void VCF::TextInputStream::read float &  val  )  [virtual]
 

Reimplemented from VCF::InputStream.

virtual void VCF::TextInputStream::read bool &  val  )  [virtual]
 

Reimplemented from VCF::InputStream.

virtual void VCF::TextInputStream::read int &  val  )  [virtual]
 

Reimplemented from VCF::InputStream.

virtual void VCF::TextInputStream::read long &  val  )  [virtual]
 

Reimplemented from VCF::InputStream.

virtual void VCF::TextInputStream::read short &  val  )  [virtual]
 

all numbers are written out as the number converted to text, followed by a space character ( ' ' ), so the value 2 becomes "2 "

Reimplemented from VCF::InputStream.

virtual uint64 VCF::TextInputStream::read unsigned char *  bytesToRead,
uint64  sizeOfBytes
[virtual]
 

Implements VCF::InputStream.

void VCF::TextInputStream::readLine String line  ) 
 

virtual void VCF::TextInputStream::seek const uint64 offset,
const SeekType offsetFrom
[virtual]
 

Implements VCF::Stream.


The documentation for this class was generated from the following file:
   Comments or Suggestions?    License Information