The Sofa data may be local in the CAS or remote from the CAS and reference by a URI conformant string set in the SofaURI feature.
Handlers for the various URI schemes both standard and user-defined schemes may be registered by setting the environment variable UIMACPP_STREAMHANDLERS as follows:
UIMACPP_STREAMHANDLERS=file:SofaStreamHandlerFile aScheme:aLibrary ...
The APIs deliver data in native byte order and expect the data read from the source to be in the network byte order.
Public Member Functions | |
virtual int | open (size_t minbufsize=0)=0 |
open the stream for reading | |
virtual INT64 | getTotalStreamSizeInBytes ()=0 |
Gets the total size of the stream in number of bytes if known. | |
virtual INT64 | howManyBytesAvailable ()=0 |
Gets the number of bytes available. | |
virtual int | read (void *pbuffer, int elementSize, size_t numElements)=0 |
This call reads at most the number of elements into specified buffer. | |
virtual int | seek (INT64 offset, int origin)=0 |
virtual void | close ()=0 |
virtual const TySofaDataPointer | getDataPointer ()=0 |
virtual | ~SofaDataStream () |
|
|
|
open the stream for reading
Implemented in uima::LocalSofaDataStream, and uima::RemoteSofaDataStream. |
|
Gets the total size of the stream in number of bytes if known.
Implemented in uima::LocalSofaDataStream, and uima::RemoteSofaDataStream. |
|
Gets the number of bytes available.
Implemented in uima::LocalSofaDataStream, and uima::RemoteSofaDataStream. |
|
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.
Implemented in uima::LocalSofaDataStream, and uima::RemoteSofaDataStream. |
|
Implemented in uima::LocalSofaDataStream, and uima::RemoteSofaDataStream. |
|
Implemented in uima::LocalSofaDataStream, and uima::RemoteSofaDataStream. |
|
Implemented in uima::LocalSofaDataStream, and uima::RemoteSofaDataStream. |