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
LibvirtExceptionpublic int addCallback(int events,
Libvirt.VirStreamEventCallback cb)
throws LibvirtException
events - the events to monitorcb - the callback methodLibvirtExceptionprotected void finalize()
throws LibvirtException
finalize in class java.lang.ObjectLibvirtExceptionpublic int finish()
throws LibvirtException
LibvirtExceptionpublic int free()
throws LibvirtException
LibvirtExceptionprotected void processError()
throws LibvirtException
LibvirtExceptionpublic int receive(byte[] data)
throws LibvirtException
data - the put the sata intoLibvirtExceptionpublic int receiveAll(Libvirt.VirStreamSinkFunc handler) throws LibvirtException
handler - the callback handlerLibvirtExceptionpublic int removeCallback()
throws LibvirtException
LibvirtExceptionpublic int send(java.lang.String data)
throws LibvirtException
data - the data to writeLibvirtExceptionpublic int sendAll(Libvirt.VirStreamSourceFunc handler) throws LibvirtException
handler - the callback handlerLibvirtExceptionpublic int updateCallback(int events)
throws LibvirtException
events - the events to monitorLibvirtException