org.virtualbox_6_1
Class IDataStream
java.lang.Object
org.virtualbox_6_1.IUnknown
org.virtualbox_6_1.IDataStream
public class IDataStream
- extends IUnknown
The IDataStream interface is used to retrieve a data stream. It is
returned byIMediumIO.convertToStream(String,List,Long,Holder)
.
Interface ID: {A338ED20-58D9-43AE-8B03-C1FD7088EF15}
Constructor Summary |
IDataStream(java.lang.String wrapped,
org.virtualbox_6_1.ObjectRefManager objMgr,
org.virtualbox_6_1.jaxws.VboxPortType port)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IDataStream
public IDataStream(java.lang.String wrapped,
org.virtualbox_6_1.ObjectRefManager objMgr,
org.virtualbox_6_1.jaxws.VboxPortType port)
getReadSize
public java.lang.Long getReadSize()
- Recommended size of a read. Requesting a larger read may be
possible in certain situations, but it is not guaranteed.
- Returns:
- Long
queryInterface
public static IDataStream queryInterface(IUnknown obj)
read
public byte[] read(java.lang.Long size,
java.lang.Long timeoutMS)
- Read data from the stream.
- Parameters:
size
- How many bytes to try read.timeoutMS
- Timeout (in ms) for limiting the wait time for data to be available.
Pass 0 for an infinite timeout.
- Returns:
- Array 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_TIMEOUT | Waiting time has expired. |