public class PipeConnection extends Object implements com.sun.star.connection.XConnection, com.sun.star.connection.XConnectionBroadcaster
XConnection interface
and is uses by the PipeConnector and the PipeAcceptor.
This class is not part of the provided api.pipeAcceptor,
pipeConnector,
XConnection| Modifier and Type | Field and Description |
|---|---|
protected String |
_aDescription |
protected ArrayList<com.sun.star.io.XStreamListener> |
_aListeners |
protected boolean |
_bFirstRead |
protected long |
_nPipeHandle |
static boolean |
DEBUG
When set to true, enables various debugging output.
|
| Constructor and Description |
|---|
PipeConnection(String description)
Constructs a new
PipeConnection. |
| Modifier and Type | Method and Description |
|---|---|
void |
addStreamListener(com.sun.star.io.XStreamListener aListener) |
void |
close()
Closes the connection.
|
void |
flush()
Flushes the buffer.
|
String |
getDescription()
Gives a description of the connection.
|
int |
read(byte[][] bytes,
int nBytesToRead)
Read the required number of bytes.
|
void |
removeStreamListener(com.sun.star.io.XStreamListener aListener) |
void |
write(byte[] aData)
Write bytes.
|
public static final boolean DEBUG
protected String _aDescription
protected long _nPipeHandle
protected ArrayList<com.sun.star.io.XStreamListener> _aListeners
protected boolean _bFirstRead
public PipeConnection(String description) throws IOException
PipeConnection.description - the description of the connection.IOExceptionpublic void addStreamListener(com.sun.star.io.XStreamListener aListener)
throws com.sun.star.uno.RuntimeException
addStreamListener in interface com.sun.star.connection.XConnectionBroadcastercom.sun.star.uno.RuntimeExceptionpublic void removeStreamListener(com.sun.star.io.XStreamListener aListener)
throws com.sun.star.uno.RuntimeException
removeStreamListener in interface com.sun.star.connection.XConnectionBroadcastercom.sun.star.uno.RuntimeExceptionpublic int read(byte[][] bytes,
int nBytesToRead)
throws com.sun.star.io.IOException,
com.sun.star.uno.RuntimeException
read in interface com.sun.star.connection.XConnectionbytes - the outparameter, where the bytes have to be placed.nBytesToRead - the number of bytes to read.com.sun.star.io.IOExceptioncom.sun.star.uno.RuntimeExceptionXConnection.read(byte[][], int)public void write(byte[] aData)
throws com.sun.star.io.IOException,
com.sun.star.uno.RuntimeException
write in interface com.sun.star.connection.XConnectionaData - the bytes to write.com.sun.star.io.IOExceptioncom.sun.star.uno.RuntimeExceptionXConnection.write(byte[])public void flush()
throws com.sun.star.io.IOException,
com.sun.star.uno.RuntimeException
flush in interface com.sun.star.connection.XConnectioncom.sun.star.io.IOExceptioncom.sun.star.uno.RuntimeExceptionXConnection.flush()public void close()
throws com.sun.star.io.IOException,
com.sun.star.uno.RuntimeException
close in interface com.sun.star.connection.XConnectioncom.sun.star.io.IOExceptioncom.sun.star.uno.RuntimeExceptionXConnection.close()public String getDescription() throws com.sun.star.uno.RuntimeException
getDescription in interface com.sun.star.connection.XConnectioncom.sun.star.uno.RuntimeExceptionXConnection.getDescription()