void signal(String what) throws IOException { log.debug("Signalling: {}", what); scp.getOutputStream().write(0); scp.getOutputStream().flush(); }
void sendMessage(String msg) throws IOException { log.debug("Sending message: {}", msg); scp.getOutputStream().write((msg + LF).getBytes(scp.getRemoteCharset())); scp.getOutputStream().flush(); check("Message ACK received"); }
void signal(String what) throws IOException { log.debug("Signalling: {}", what); scp.getOutputStream().write(0); scp.getOutputStream().flush(); }
@Override public ExecChannel create() throws Exception { connection = noPTYConnection(); output = SessionChannel.class.cast(acquire(connection)).exec(command); return new ExecChannel(output.getOutputStream(), output.getInputStream(), output.getErrorStream(), new Supplier<Integer>() { @Override public Integer get() { return output.getExitStatus(); } }, new Closeable() { @Override public void close() throws IOException { clear(); } }); }
@Override public ExecChannel create() throws Exception { session = SessionChannel.class.cast(acquire(noPTYConnection())); output = session.exec(command); return new ExecChannel(output.getOutputStream(), output.getInputStream(), output.getErrorStream(), new Supplier<Integer>() { @Override public Integer get() { return output.getExitStatus(); } }, new Closeable() { @Override public void close() throws IOException { clear(); } }); }
@Override public ExecChannel create() throws Exception { connection = noPTYConnection(); output = SessionChannel.class.cast(acquire(connection)).exec(command); return new ExecChannel(output.getOutputStream(), output.getInputStream(), output.getErrorStream(), new Supplier<Integer>() { @Override public Integer get() { return output.getExitStatus(); } }, new Closeable() { @Override public void close() throws IOException { clear(); } }); }
@Override public ExecChannel create() throws Exception { session = SessionChannel.class.cast(acquire(noPTYConnection())); output = session.exec(command); return new ExecChannel(output.getOutputStream(), output.getInputStream(), output.getErrorStream(), new Supplier<Integer>() { @Override public Integer get() { return output.getExitStatus(); } }, new Closeable() { @Override public void close() throws IOException { clear(); } }); }
@Override public ExecChannel create() throws Exception { session = SessionChannel.class.cast(acquire(noPTYConnection())); output = session.exec(command); return new ExecChannel(output.getOutputStream(), output.getInputStream(), output.getErrorStream(), new Supplier<Integer>() { @Override public Integer get() { return output.getExitStatus(); } }, new Closeable() { @Override public void close() throws IOException { clear(); } }); }
long transferToRemote(StreamCopier.Listener listener, InputStream src, long length) throws IOException { return new StreamCopier(src, scp.getOutputStream(), loggerFactory) .bufSize(scp.getRemoteMaxPacketSize()).length(length) .keepFlushing(false) .listener(listener) .copy(); }
long transferToRemote(StreamCopier.Listener listener, InputStream src, long length) throws IOException { return new StreamCopier(src, scp.getOutputStream()) .bufSize(scp.getRemoteMaxPacketSize()).length(length) .keepFlushing(false) .listener(listener) .copy(); }
void signal(String what) throws IOException { log.debug("Signalling: {}", what); scp.getOutputStream().write(0); scp.getOutputStream().flush(); }
void sendMessage(String msg) throws IOException { log.debug("Sending message: {}", msg); scp.getOutputStream().write((msg + LF).getBytes(IOUtils.UTF8)); scp.getOutputStream().flush(); check("Message ACK received"); }
void sendMessage(String msg) throws IOException { log.debug("Sending message: {}", msg); scp.getOutputStream().write((msg + LF).getBytes(scp.getRemoteCharset())); scp.getOutputStream().flush(); check("Message ACK received"); }
long transferToRemote(StreamCopier.Listener listener, InputStream src, long length) throws IOException { return new StreamCopier(src, scp.getOutputStream(), loggerFactory) .bufSize(scp.getRemoteMaxPacketSize()).length(length) .keepFlushing(false) .listener(listener) .copy(); }