Public Member Functions | |
LocalSofaDataStream (SofaFS &sofaFS) | |
~LocalSofaDataStream () | |
int | open (size_t minbufsize=0) |
open the stream for reading | |
INT64 | getTotalStreamSizeInBytes () |
Gets the total size of the stream in number of bytes if known. | |
INT64 | howManyBytesAvailable () |
Gets the number of bytes available. | |
int | read (void *pbuffer, int elementSize, size_t numElements) |
This call reads at most the number of elements into specified buffer. | |
int | seek (INT64 offset, int origin) |
void | close () |
const TySofaDataPointer | getDataPointer () |
uima::LocalSofaDataStream::LocalSofaDataStream | ( | SofaFS & | sofaFS | ) |
uima::LocalSofaDataStream::~LocalSofaDataStream | ( | ) |
int uima::LocalSofaDataStream::open | ( | size_t | minbufsize = 0 |
) | [virtual] |
open the stream for reading
minbufsize | optional specifies the minimum size of the internal buffer the stream handler should use. defaults to the value of BUFSIZE |
Implements uima::SofaDataStream.
INT64 uima::LocalSofaDataStream::getTotalStreamSizeInBytes | ( | ) | [virtual] |
Gets the total size of the stream in number of bytes if known.
Implements uima::SofaDataStream.
INT64 uima::LocalSofaDataStream::howManyBytesAvailable | ( | ) | [virtual] |
Gets the number of bytes available.
Implements uima::SofaDataStream.
int uima::LocalSofaDataStream::read | ( | void * | pbuffer, | |
int | elementSize, | |||
size_t | numElements | |||
) | [virtual] |
This call reads at most the number of elements into specified buffer.
The call blocks until the number of required element are read or EOF. This will return elements in the native byte order for the current platform
The buffer is allocated and owned by the caller and must be at least elementSize*numElements in size.
pbuffer | ||
elementSize | e.g., 1, 2, 4, 8 | |
numElements |
Implements uima::SofaDataStream.
int uima::LocalSofaDataStream::seek | ( | INT64 | offset, | |
int | origin | |||
) | [virtual] |
Implements uima::SofaDataStream.
void uima::LocalSofaDataStream::close | ( | ) | [virtual] |
Implements uima::SofaDataStream.
const TySofaDataPointer uima::LocalSofaDataStream::getDataPointer | ( | ) | [virtual] |
Implements uima::SofaDataStream.