public JSONObject _dataxfer(JSONObject args) throws Exception {
		// check header
		JSONObject header = args.getJSONObject(HEADER_KEY);
		if ( header == null  || !header.has(HEADER_TAG_KEY) || !header.getString(HEADER_TAG_KEY).equalsIgnoreCase(HEADER_STR) )
			throw new Exception("Missing or incorrect header value: '" + header + "'");
		
		// To-do: some dataxfer work here, not echo
		int xferLength = header.getInt("xferLength");
		JSONObject retVal = new JSONObject();
		JSONObject retHeader = new JSONObject();
		
		retHeader.put(HEADER_TAG_KEY, RESPONSE_OKAY_STR).put(HEADER_XFERLENGTH_KEY, xferLength);
		retVal.put(HEADER_KEY, retHeader);
		
		String msg = "!";
		byte[] buf = new byte[xferLength];
		// copy the msg i times into buf until buf is full (PACKET_SIZE = 1000 bytes)
		for (int i = 0; i < xferLength; i++){
			System.arraycopy(msg.getBytes(), 0, buf, i, msg.getBytes().length);
		}
		
		retVal.put("data", Base64.encodeBytes(buf));	
		return retVal;
	}