FDO API Reference | Feature Data Objects |
#include <FileStream.h>
Inherits FdoIoStream.
Inheritance diagram for FdoIoFileStream:
Definition at line 26 of file FileStream.h.
Public Member Functions | |
virtual FDO_API_COMMON FdoBoolean | CanRead () |
gets the reading capability. | |
virtual FDO_API_COMMON FdoBoolean | CanWrite () |
gets the writing capability. | |
virtual FDO_API_COMMON FdoInt64 | GetIndex () |
gets the current position for the stream. | |
virtual FDO_API_COMMON FdoInt64 | GetLength () |
gets the current length of the stream. | |
virtual FDO_API_COMMON FdoBoolean | HasContext () |
returns whether the stream has any positional context. Streams without context can only be read and written in a forward-only manner. These streams do not allow position and length changes. | |
virtual FDO_API_COMMON FdoSize | Read (FdoByte *buffer, FdoSize count) |
reads the number of bytes indicated by count into the given buffer, or the number of bytes after the current stream position, whichever is less. The stream’s current position is moved ahead by the number of bytes read. | |
virtual FDO_API_COMMON void | Reset () |
sets the position to the start of the stream. | |
virtual FDO_API_COMMON void | SetLength (FdoInt64 length) |
truncates the stream to the indicated length. | |
virtual FDO_API_COMMON void | Skip (FdoInt64 offset) |
skips over part of the stream. | |
virtual FDO_API_COMMON void | Write (FdoIoStream *stream, FdoSize count=0) |
reads the number of bytes from the given stream, and writes them to this stream. | |
virtual FDO_API_COMMON 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 | |
FDO_API_COMMON FdoIoFileStream * | Create (FILE *fp) |
creates the stream around a C Runtime file stream. | |
FDO_API_COMMON FdoIoFileStream * | Create (FdoString *fileName, FdoString *accessModes) |
creates the stream for a named file. | |
Protected Member Functions | |
void | CheckContext (FdoString *caller) |
FdoIoFileStream (FILE *fp) | |
FdoIoFileStream (FdoString *fileName, FdoString *accessModes) | |
FdoIoFileStream () | |
Default constructor to satisfy Linux. | |
int | GetFd () |
void | InitFileStatus () |
Sets up the canRead and canWrite flags. | |
virtual | ~FdoIoFileStream (void) |
Static Protected Attributes | |
const size_t | mBufferSize = 1024 |
Buffer size for writing from another stream. |
|
Default constructor to satisfy Linux.
Definition at line 71 of file FileStream.h. |
|
|
|
|
|
|
|
gets the reading capability.
Reimplemented from FdoIoStream. |
|
gets the writing capability.
Reimplemented from FdoIoStream. |
|
Throw exception if this stream has no context. Context is lost when the file size exceeds MAX_LONG. |
|
creates the stream around a C Runtime file stream.
|
|
creates the stream for a named file.
|
|
Definition at line 76 of file FileStream.h. |
|
gets the current position for the stream.
Implements FdoIoStream. |
|
gets the current length of the stream.
Implements FdoIoStream. |
|
returns whether the stream has any positional context. Streams without context can only be read and written in a forward-only manner. These streams do not allow position and length changes.
Reimplemented from FdoIoStream. |
|
Sets up the canRead and canWrite flags.
|
|
reads the number of bytes indicated by count into the given buffer, or the number of bytes after the current stream position, whichever is less. The stream’s current position is moved ahead by the number of bytes read.
Implements FdoIoStream. |
|
sets the position to the start of the stream.
Implements FdoIoStream. |
|
truncates the stream to the indicated length.
Implements FdoIoStream. |
|
skips over part of the stream.
Implements FdoIoStream. |
|
reads the number of bytes from the given stream, and writes them to this stream.
Implements FdoIoStream. |
|
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.
Implements FdoIoStream. |
|
Buffer size for writing from another stream.
Definition at line 89 of file FileStream.h. |
Comments or suggestions? Send us feedback. |