public class FromEclipseQueue
extends java.io.InputStream
EXDRInputStream
for a class which can handle this).
In addition to the standard methods inherited from its superclass, this class
also provides the ability to attach a QueueListener object to the
FromEclipseQueue, as a handler for incoming data.
There is no public constructor; to access an FromEclipseQueue use the
createFromEclipseQueue() of an object implementing the EclipseConnection interface or the getEclipseStderr() or
getEclipseStdout() method of an object implementing the
EclipseEngine interface.
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close()
Closes the queue (both eclipse and Java sides), removing any listener.
|
int |
read() |
int |
read(byte[] b,
int off,
int len)
Read bytes from the FromEclipseQueue into a byte array.
|
void |
removeListener()
Detach any QueueListener from this FromEclipseQueue.
|
void |
setListener(QueueListener l)
Attach a QueueListener to this FromEclipseQueue for handling
incoming data.
|
public int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
len bytes are read from the queue and stored in byte
array b at offset off.read in class java.io.InputStreamjava.io.IOExceptionpublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic void setListener(QueueListener l) throws java.io.IOException
dataAvailable() method of the
QueueListener is invoked.java.io.IOExceptionpublic void removeListener()
throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOException