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

VCF::OSXFileStream Class Reference

This is going to based on the C runtime's fopen/fread/fwrite stream API for now. More...

#include <OSXFileStream.h>

Inheritance diagram for VCF::OSXFileStream:

VCF::FileStreamPeer List of all members.

Public Member Functions

 OSXFileStream (const String &filename, const FileStreamAccessType &accessType)
 OSXFileStream (File *file)
virtual ~OSXFileStream ()
virtual void seek (const uint64 &offset, const SeekType &offsetFrom)
 moves the seek pointer offset number of bytes in the direction specified by the offsetFrom argument.
virtual uint64 getSize ()
 returns the size of the file stream in bytes
virtual uint64 read (unsigned char *bytesToRead, uint64 sizeOfBytes)
 reads sizeOfBytes bytes from the stream into the buffer bytesToRead
virtual uint64 write (const unsigned char *bytesToWrite, uint64 sizeOfBytes)
 writes sizeOfBytes bytes to the file stream from the buffer bytesToWrite.
virtual uchargetBuffer ()
 returns a pointer to the buffer that represents the file contents

Detailed Description

This is going to based on the C runtime's fopen/fread/fwrite stream API for now.


Constructor & Destructor Documentation

VCF::OSXFileStream::OSXFileStream const String filename,
const FileStreamAccessType accessType
 

VCF::OSXFileStream::OSXFileStream File file  ) 
 

virtual VCF::OSXFileStream::~OSXFileStream  )  [virtual]
 


Member Function Documentation

virtual uchar* VCF::OSXFileStream::getBuffer  )  [virtual]
 

returns a pointer to the buffer that represents the file contents

Implements VCF::FileStreamPeer.

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

returns the size of the file stream in bytes

Implements VCF::FileStreamPeer.

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

reads sizeOfBytes bytes from the stream into the buffer bytesToRead

Parameters:
char* a buffer of at least sizeOfBytes long. This must be allocated by the caller.
uint32 the number of bytes to read from the file, starting at the current seek position.

Implements VCF::FileStreamPeer.

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

moves the seek pointer offset number of bytes in the direction specified by the offsetFrom argument.

Parameters:
uint32 the number of bytes of offset the seek pointer
SeekType the direction to offset the seek pointer, which may be one of the following values
SEEK_FROM_START - offsets from the beginning of the file
SEEK_FROM_RELATIVE - offsets relative to the current seek position
SEEK_FROM_END - offsets backwards, starting at the end of the file

Implements VCF::FileStreamPeer.

virtual uint64 VCF::OSXFileStream::write const unsigned char *  bytesToWrite,
uint64  sizeOfBytes
[virtual]
 

writes sizeOfBytes bytes to the file stream from the buffer bytesToWrite.

Parameters:
char* a buffer that must be at least sizeOfBytes long, that contains the data that will written out to the file stream
@ uint32 the number of bytes to write

Implements VCF::FileStreamPeer.


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