public void sendData(CTSTransferMode mode, Object data) {
		try {
			if(!data.getClass().equals(mode.GetType()))
				throw new IllegalArgumentException("");
			out.writeObject(mode);
			out.writeObject(data);
		} catch (IOException e) {
			e.printStackTrace();
		} 
	}