7980818283848586878889
} catch (IOException e) { try { client.disconnect(); } catch (IOException f) {} e.printStackTrace(); System.err.println("Could not execute command.");
949596979899100101102103104
IOUtil.readWrite(client.getInputStream(), client.getOutputStream(), System.in, System.out); try { client.disconnect(); } catch (IOException e) { e.printStackTrace(); System.exit(1);
111112113114115116117118119120121
} else { throw new FileNotFoundException("unexpected server response: " + serverResponse.trim()); } } finally { rcmdClient.disconnect(); } } /** * Copies the data read from the given input stream to the remote file. The
143144145146147148149150151152153
expectAck(is); copyStream(fis, os, filesize); sendAck(os); expectAck(is); } finally { rcmdClient.disconnect(); } } private void sendAck(final OutputStream os) throws IOException { os.write(0);
8182838485868788899091
96979899100101102103104105106
116117118119120121122123124125126
131132133134135136137138139140141
7778798081828384858687
9293949596979899100101102