Package com.sun.jini.test.spec.jeri.mux.util

Examples of com.sun.jini.test.spec.jeri.mux.util.ProtocolException


        //extract the data message
        byte[] dataMessage = new byte[serverBytes.length-8];
        System.arraycopy(serverBytes,8,dataMessage,0,dataMessage.length);
        //Verify that the received message is a data message
        if ((dataMessage[0]&0x80)!=0x80) {
            throw new ProtocolException("Message received: "
                + Util.convert(dataMessage) + " is not a data message");
        }
        //Verify the length of the message
        int size = (dataMessage[2]<<8) + dataMessage[3];
        if (size!=dataMessage.length-4) {
            throw new ProtocolException("Data message received reported"
                + " incorrect size");
        }

    }
View Full Code Here

TOP

Related Classes of com.sun.jini.test.spec.jeri.mux.util.ProtocolException

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.