XOutputStream moStream = (XOutputStream)
UnoRuntime.queryInterface(XOutputStream.class, mostream);
XOutputStream PipeOut = (XOutputStream)
UnoRuntime.queryInterface(XOutputStream.class, aPipe);
XInputStream PipeIn = (XInputStream)
UnoRuntime.queryInterface(XInputStream.class, aPipe);
xdSo.setOutputStream(moStream);
xdSmo.setOutputStream(PipeOut);
XObjectInputStream iStream = (XObjectInputStream)
UnoRuntime.queryInterface(XObjectInputStream.class, istream);
XObjectOutputStream oStream = null;
oStream = (XObjectOutputStream)
UnoRuntime.queryInterface(XObjectOutputStream.class, ostream);
XActiveDataSink xmSi = (XActiveDataSink)
UnoRuntime.queryInterface(XActiveDataSink.class, mistream);
XInputStream xmIstream = (XInputStream)
UnoRuntime.queryInterface(XInputStream.class, mistream);
XActiveDataSink xdSi = (XActiveDataSink) UnoRuntime.queryInterface
(XActiveDataSink.class, istream);
xdSi.setInputStream(xmIstream);