MeVisLab Toolbox Reference
|
Implements reading and writing from a given file descriptor. More...
#include <mlImageFormatFileAccess.h>
Public Member Functions | |
MLImageFormatDiskFileHandle (int fd) | |
Standard constructor. More... | |
~MLImageFormatDiskFileHandle () override | |
Destructor to clean up. More... | |
bool | read (MLuint8 *data, MLuint startPosition, MLuint numBytes) override |
Reads the given block and returns true if numBytes have been read. More... | |
MLErrorCode | write (MLuint startPos, const MLuint8 *data, size_t length) override |
Writes the given block. More... | |
MLint64 | getFileSize () override |
Returns the current complete file size. If an error occurs, a value <0 is returned. More... | |
MLErrorCode | close () override |
Closes the file. More... | |
![]() | |
MLImageFormatAbstractFileHandle () | |
Standard constructor. More... | |
virtual | ~MLImageFormatAbstractFileHandle () |
Destructor to clean up. Reimplement to close the file. More... | |
MLuint8 * | read (MLuint startPosition, MLuint numBytes) |
Convenience method that reads the given block and returns an array that needs to be freed by free(). More... | |
Implements reading and writing from a given file descriptor.
Definition at line 55 of file mlImageFormatFileAccess.h.
ml::MLImageFormatDiskFileHandle::MLImageFormatDiskFileHandle | ( | int | fd | ) |
Standard constructor.
|
override |
Destructor to clean up.
|
overridevirtual |
Closes the file.
Implements ml::MLImageFormatAbstractFileHandle.
|
overridevirtual |
Returns the current complete file size. If an error occurs, a value <0 is returned.
Implements ml::MLImageFormatAbstractFileHandle.
|
overridevirtual |
Reads the given block and returns true
if numBytes
have been read.
The data pointer needs to be large enough to hold numBytes bytes.
Implements ml::MLImageFormatAbstractFileHandle.
|
overridevirtual |
Writes the given block.
Implements ml::MLImageFormatAbstractFileHandle.