public byte[] DataXfer(JSONObject header, String hostIP, int port, int timeout) throws Exception{
		try {
			// send message
			header.put(DataXferRPCService.HEADER_XFERLENGTH_KEY, xferLength);
			JSONObject args = new JSONObject().put(DataXferRPCService.HEADER_KEY, header);
			
			JSONObject response = RPCCall.invoke(hostIP, port, "dataxferrpc", "dataxfer", args, timeout );
			if ( response == null ) throw new IOException("dataXferRPC failed; response is null");

			// examine response
			JSONObject rcvdHeader = response.optJSONObject(DataXferRPCService.HEADER_KEY);
			if ( rcvdHeader == null || !rcvdHeader.has(DataXferRPCService.HEADER_TAG_KEY)||
					!rcvdHeader.getString(DataXferRPCService.HEADER_TAG_KEY).equalsIgnoreCase(DataXferServiceBase.RESPONSE_OKAY_STR))
				throw new IOException("Bad response header: got '" + rcvdHeader.toString() +
						               "' but wanted a JSONOBject with key '" + DataXferRPCService.HEADER_TAG_KEY + "' and string value '" +
						               DataXferServiceBase.RESPONSE_OKAY_STR + "'");

			return Base64.decode(response.getString("data"));
		} catch (Exception e) {
			throw new Exception ("Exception: " + e.getMessage());
			
		} 
	}