public class Stream
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
VIR_STREAM_NONBLOCK |
Modifier and Type | Method and Description |
---|---|
int |
abort()
Request that the in progress data transfer be cancelled abnormally before
the end of the stream has been reached
|
int |
addCallback(int events,
Libvirt.VirStreamEventCallback cb)
Register a callback to be notified when a stream becomes writable, or
readable.
|
protected void |
finalize() |
int |
finish()
Indicate that there is no further data is to be transmitted on the
stream.
|
int |
free()
Decrement the reference count on a stream, releasing the stream object if
the reference count has hit zero.
|
protected void |
processError()
Error handling logic to throw errors.
|
int |
receive(byte[] data)
Receieves data from teh stream into the buffer provided.
|
int |
receiveAll(Libvirt.VirStreamSinkFunc handler)
Batch receive method
|
int |
removeCallback()
Remove an event callback from the stream
|
int |
send(java.lang.String data)
Write a series of bytes to the stream.
|
int |
sendAll(Libvirt.VirStreamSourceFunc handler)
Batch send method
|
int |
updateCallback(int events)
Changes the set of events to monitor for a stream.
|
public int abort() throws LibvirtException
LibvirtException
public int addCallback(int events, Libvirt.VirStreamEventCallback cb) throws LibvirtException
events
- the events to monitorcb
- the callback methodLibvirtException
protected void finalize() throws LibvirtException
finalize
in class java.lang.Object
LibvirtException
public int finish() throws LibvirtException
LibvirtException
public int free() throws LibvirtException
LibvirtException
protected void processError() throws LibvirtException
LibvirtException
public int receive(byte[] data) throws LibvirtException
data
- the put the sata intoLibvirtException
public int receiveAll(Libvirt.VirStreamSinkFunc handler) throws LibvirtException
handler
- the callback handlerLibvirtException
public int removeCallback() throws LibvirtException
LibvirtException
public int send(java.lang.String data) throws LibvirtException
data
- the data to writeLibvirtException
public int sendAll(Libvirt.VirStreamSourceFunc handler) throws LibvirtException
handler
- the callback handlerLibvirtException
public int updateCallback(int events) throws LibvirtException
events
- the events to monitorLibvirtException