public NewTransferObject createNewTransferObject() {
     NewTransferObject to = new NewTransferObject();
     to.setConnectionName(connectionName);
     to.setLongConnection(longConnection);
     to.setServerCallProxy(serverCallProxy);
     if (calleeClass != null) {
         to.setCalleeClass(calleeClass);
     }
     to.setCompress(compress);
     to.setNewVersion(true);
     return to;
 }
Пример #2
0
        public NewTransferObject createNewTransferObject()
        {
            NewTransferObject to = new NewTransferObject();

            to.setConnectionName(connectionName);
            to.setLongConnection(longConnection);
            to.setServerCallProxy(serverCallProxy);
            if (calleeClass != null)
            {
                to.setCalleeClass(calleeClass);
            }
            to.setCompress(compress);
            to.setNewVersion(true);
            return(to);
        }
Пример #3
0
        public static TransferObject byteArrayToTransferObject(byte[] byteArray){
		    //TransferObject to = new TransferObject();
    	    int receiveLength = byteArray.Length;
		    byte[] toByteArray = new byte[receiveLength - 1];
            Array.Copy(byteArray, 1, toByteArray, 0, receiveLength - 1);
            byte flagbyte = byteArray[0];

            TransferObject to = null;
            //check if new version of transfer object
            if (TransferUtil.isNewVersion(flagbyte)) {
                to = new NewTransferObject();
            } else {
                to = new StandardTransferObject();
            }

            if (TransferUtil.isCompress(flagbyte)) {
			    toByteArray = TransferUtil.getInputByCompress(toByteArray);
		    } else {
			    toByteArray = TransferUtil.getInputByNormal(toByteArray);
		    }
		    to.setByteData(toByteArray);
    		
		    return to;
        }