public class PipeConnection
extends java.lang.Object
XConnection
interface
and is uses by the PipeConnector
and the PipeAcceptor
.
This class is not part of the provided api
.
com.sun.star.comp.connections.PipeAcceptor
,
com.sun.star.comp.connections.PipeConnector
,
com.sun.star.connections.XConnection
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
_aDescription |
protected java.util.Vector |
_aListeners |
protected boolean |
_bFirstRead |
protected long |
_nPipeHandle |
static boolean |
DEBUG
When set to true, enables various debugging output.
|
Constructor and Description |
---|
PipeConnection(java.lang.String description)
Constructs a new
PipeConnection . |
Modifier and Type | Method and Description |
---|---|
void |
addStreamListener(XStreamListener aListener) |
void |
close()
Closes the connection.
|
void |
flush()
Flushes the buffer.
|
java.lang.String |
getDescription()
Gives a description of the connection.
|
int |
read(byte[][] bytes,
int nBytesToRead)
Read the required number of bytes.
|
void |
removeStreamListener(XStreamListener aListener) |
void |
write(byte[] aData)
Write bytes.
|
public static final boolean DEBUG
protected java.lang.String _aDescription
protected long _nPipeHandle
protected java.util.Vector _aListeners
protected boolean _bFirstRead
public PipeConnection(java.lang.String description) throws java.io.IOException
PipeConnection
.
description
- the description of the connectionpipe
- the pipe of the connectionjava.io.IOException
public void addStreamListener(XStreamListener aListener) throws com.sun.star.uno.RuntimeException
com.sun.star.uno.RuntimeException
public void removeStreamListener(XStreamListener aListener) throws com.sun.star.uno.RuntimeException
com.sun.star.uno.RuntimeException
public int read(byte[][] bytes, int nBytesToRead) throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException
aReadBytes
- the outparameter, where the bytes have to be placednBytesToRead
- the number of bytes to readcom.sun.star.io.IOException
com.sun.star.uno.RuntimeException
com.sun.star.connections.XConnection#read
public void write(byte[] aData) throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException
aData
- the bytes to writecom.sun.star.io.IOException
com.sun.star.uno.RuntimeException
com.sun.star.connections.XConnection#write
public void flush() throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException
com.sun.star.io.IOException
com.sun.star.uno.RuntimeException
com.sun.star.connections.XConnection#flush
public void close() throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException
com.sun.star.io.IOException
com.sun.star.uno.RuntimeException
com.sun.star.connections.XConnection#close
public java.lang.String getDescription() throws com.sun.star.uno.RuntimeException
com.sun.star.uno.RuntimeException
com.sun.star.connections.XConnection#getDescription