Package io.fabric8.gateway.handlers.detecting.protocol.openwire.support

Examples of io.fabric8.gateway.handlers.detecting.protocol.openwire.support.OpenwireException


    public void writeFloat(float value) throws OpenwireException {
        initializeWriting();
        try {
            this.dataOut.writeFloat(value);
        } catch (IOException ioe) {
            throw new OpenwireException(ioe);
        }
    }
View Full Code Here


    public void writeDouble(double value) throws OpenwireException {
        initializeWriting();
        try {
            this.dataOut.writeDouble(value);
        } catch (IOException ioe) {
            throw new OpenwireException(ioe);
        }
    }
View Full Code Here

    public void writeUTF(String value) throws OpenwireException {
        initializeWriting();
        try {
            this.dataOut.writeUTF(value);
        } catch (IOException ioe) {
            throw new OpenwireException(ioe);
        }
    }
View Full Code Here

    public void writeBytes(byte[] value) throws OpenwireException {
        initializeWriting();
        try {
            this.dataOut.write(value);
        } catch (IOException ioe) {
            throw new OpenwireException(ioe);
        }
    }
View Full Code Here

    public void writeBytes(byte[] value, int offset, int length) throws OpenwireException {
        initializeWriting();
        try {
            this.dataOut.write(value, offset, length);
        } catch (IOException ioe) {
            throw new OpenwireException(ioe);
        }
    }
View Full Code Here

        } else if (value instanceof String) {
            writeUTF(value.toString());
        } else if (value instanceof byte[]) {
            writeBytes((byte[])value);
        } else {
            throw new OpenwireException("Cannot write non-primitive type:" + value.getClass());
        }
    }
View Full Code Here

                // keep track of the real length of the content if
                // we are compressed.
                try {
                    os.write(new byte[4]);
                } catch (IOException e) {
                    throw new OpenwireException(e);
                }
                length = 0;
                compressed = true;
                final Deflater deflater = new Deflater(Deflater.BEST_SPEED);
                os = new FilterOutputStream(new DeflaterOutputStream(os, deflater)) {
View Full Code Here

        }
    }

    protected void checkWriteOnlyBody() throws OpenwireException {
        if (!readOnlyBody) {
            throw new OpenwireException("Message body is write-only");
        }
    }
View Full Code Here

                try {
                    DataInputStream dis = new DataInputStream(is);
                    length = dis.readInt();
                    dis.close();
                } catch (IOException e) {
                    throw new OpenwireException(e);
                }
                is = new InflaterInputStream(is);
            } else {
                length = data.getLength();
            }
View Full Code Here

    public boolean readBoolean() throws OpenwireException {
        initializeReading();
        try {
            return this.dataIn.readBoolean();
        } catch (EOFException e) {
            throw new OpenwireException(e);
        } catch (IOException e) {
            throw new OpenwireException(e);
        }
    }
View Full Code Here

TOP

Related Classes of io.fabric8.gateway.handlers.detecting.protocol.openwire.support.OpenwireException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.