public double getBalance() {
   try {
     arguments = null;
     String methodName = "getBalance";
     sendMethodCall(methodName);
     ReturnValue retValue = receiveResponse();
     Double i = (Double) retValue.getValue();
     return i;
   } catch (UnknownHostException e) {
     e.printStackTrace();
   } catch (IOException e) {
     e.printStackTrace();
   } catch (ClassNotFoundException e) {
     e.printStackTrace();
   }
   return -1;
 }
 protected void checkForExceptions(ReturnValue returnValue) {
   if (returnValue.getException() != null) {
     throw returnValue.getException();
   }
 }