VirtualBox Main API
Public Member Functions | Public Attributes | List of all members
IDataStream Interface Reference

The IDataStream interface is used to retrieve a data stream. More...

Inheritance diagram for IDataStream:

Public Member Functions

void read (in unsigned long size, in unsigned long timeoutMS, [retval] out octet[] data)
 Read data from the stream.

Public Attributes

readonly attribute unsigned long readSize
 Recommended size of a read.

Detailed Description

The IDataStream interface is used to retrieve a data stream.

It is returned by IMediumIO::convertToStream.

Interface ID:

Member Function Documentation

◆ read()

void IDataStream::read ( in unsigned long  size,
in unsigned long  timeoutMS,
[retval] out octet[]  data 

Read data from the stream.

sizeHow many bytes to try read.
timeoutMSTimeout (in ms) for limiting the wait time for data to be available. Pass 0 for an infinite timeout.
dataArray of data read. This may be shorter than the specified size. Returning a zero-sized array indicates the end of the stream, if the status is successful.
Expected result codes:
VBOX_E_TIMEOUTWaiting time has expired.

Member Data Documentation

◆ readSize

readonly attribute unsigned long IDataStream::readSize

Recommended size of a read.

Requesting a larger read may be possible in certain situations, but it is not guaranteed.