SofaStreamHandler
defines the API methods that must be implemented to support reading custom URI schemes for reading.
Public Member Functions | |
SofaStreamHandler (void) | |
Constructor. | |
virtual | ~SofaStreamHandler () |
Destructor. | |
virtual void | openStream (const char *uriString)=0 |
Open a stream to this URL. | |
virtual void | openStream (const char *uriString, size_t minimumBufferSize)=0 |
Open a stream to this URL and specify the minimum size of the internal buffer. | |
virtual INT64 | getTotalStreamSize ()=0 |
Gets the total size of the data in bytes. | |
virtual size_t | getBufferSize ()=0 |
Gets the size of the internal buffer. | |
virtual INT64 | howManyAvailable ()=0 |
Gets number of bytes available to read. | |
virtual INT64 | getNext (size_t numBytes, void *pBuffer)=0 |
Read the specified number of bytes from the current position. | |
virtual int | seek (INT64 offset, int origin)=0 |
Sets the position within the current stream. | |
virtual void | closeStream ()=0 |
closeStream close the stream. | |
virtual void * | getDataPointer () |
getDataPointer This returns a pointer to the data in memory. |
|
Constructor.
|
|
Destructor.
|
|
Open a stream to this URL.
|
|
Open a stream to this URL and specify the minimum size of the internal buffer.
|
|
Gets the total size of the data in bytes.
|
|
Gets the size of the internal buffer.
|
|
Gets number of bytes available to read.
|
|
Read the specified number of bytes from the current position. Advance the current position by the number of bytes read. This call blocks till read request is satisfied or EOF is reached.
|
|
Sets the position within the current stream.
|
|
closeStream close the stream. Delete the internal buffer. |
|
getDataPointer This returns a pointer to the data in memory. A valid pointer is returned only if the entire stream data is available in memory, that is getTotalLength() is equal to howManyAvailable(). Otherwise return NULL.
|