// 1. Open socket connection
final Socket socket = new Socket(InetAddress.getByName(address),
port);
log(format("Connecting to %s", socket.getRemoteSocketAddress()));
final RemoteControlWriter remoteWriter = new RemoteControlWriter(
socket.getOutputStream());
final RemoteControlReader remoteReader = new RemoteControlReader(
socket.getInputStream());
// 2. Open file output
output = openOutputStream();
final ExecutionDataWriter outputWriter = new ExecutionDataWriter(
output);
remoteReader.setSessionInfoVisitor(outputWriter);
remoteReader.setExecutionDataVisitor(outputWriter);
// 3. Request dump
remoteWriter.visitDumpCommand(dump, reset);
remoteReader.read();
socket.close();
} catch (final IOException e) {