Search in sources :

Example 1 with CountableBufferedInputStream

use of com.swiftmq.impl.net.netty.CountableBufferedInputStream in project swiftmq-ce by iitsoftware.

the class IntraVMServerEndpointImpl method init.

private void init() {
    dis = new DataByteArrayInputStream();
    in = new CountableBufferedInputStream(dis);
    dos = new DataByteArrayOutputStream() {

        public void flush() throws IOException {
            if (isClosed() || clientConnection.isClosed())
                throw new IOException("Connection is closed");
            super.flush();
            clientConnection.chunkCompleted(getBuffer(), 0, getCount());
            rewind();
        }
    };
    out = new CountableWrappedOutputStream(dos);
}
Also used : DataByteArrayOutputStream(com.swiftmq.tools.util.DataByteArrayOutputStream) IOException(java.io.IOException) CountableWrappedOutputStream(com.swiftmq.impl.net.netty.CountableWrappedOutputStream) DataByteArrayInputStream(com.swiftmq.tools.util.DataByteArrayInputStream) CountableBufferedInputStream(com.swiftmq.impl.net.netty.CountableBufferedInputStream)

Aggregations

CountableBufferedInputStream (com.swiftmq.impl.net.netty.CountableBufferedInputStream)1 CountableWrappedOutputStream (com.swiftmq.impl.net.netty.CountableWrappedOutputStream)1 DataByteArrayInputStream (com.swiftmq.tools.util.DataByteArrayInputStream)1 DataByteArrayOutputStream (com.swiftmq.tools.util.DataByteArrayOutputStream)1 IOException (java.io.IOException)1