org.virtualbox_6_0
Class IDataStream

java.lang.Object
  extended by org.virtualbox_6_0.IUnknown
      extended by org.virtualbox_6_0.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}


Field Summary
 
Fields inherited from class org.virtualbox_6_0.IUnknown
obj, objMgr, port
 
Constructor Summary
IDataStream(java.lang.String wrapped, org.virtualbox_6_0.ObjectRefManager objMgr, org.virtualbox_6_0.jaxws.VboxPortType port)
           
 
Method Summary
 java.lang.Long getReadSize()
          Recommended size of a read.
static IDataStream queryInterface(IUnknown obj)
           
 byte[] read(java.lang.Long size, java.lang.Long timeoutMS)
          Read data from the stream.
 
Methods inherited from class org.virtualbox_6_0.IUnknown
getObjMgr, getRemoteWSPort, getWrapped, releaseRemote
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IDataStream

public IDataStream(java.lang.String wrapped,
                   org.virtualbox_6_0.ObjectRefManager objMgr,
                   org.virtualbox_6_0.jaxws.VboxPortType port)
Method Detail

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_TIMEOUTWaiting time has expired.