mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-09 00:18:39 +03:00
Removed deprecated Session.Command's methods - getOutputAsString() and getErrorAsString()
This commit is contained in:
@@ -19,7 +19,6 @@ import net.schmizz.sshj.connection.ConnectionException;
|
|||||||
import net.schmizz.sshj.connection.channel.Channel;
|
import net.schmizz.sshj.connection.channel.Channel;
|
||||||
import net.schmizz.sshj.transport.TransportException;
|
import net.schmizz.sshj.transport.TransportException;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -81,14 +80,6 @@ public interface Session
|
|||||||
void signal(Signal signal)
|
void signal(Signal signal)
|
||||||
throws TransportException;
|
throws TransportException;
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
String getOutputAsString()
|
|
||||||
throws IOException;
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
String getErrorAsString()
|
|
||||||
throws IOException;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Shell API. */
|
/** Shell API. */
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ import net.schmizz.sshj.connection.ConnectionException;
|
|||||||
import net.schmizz.sshj.connection.channel.ChannelInputStream;
|
import net.schmizz.sshj.connection.channel.ChannelInputStream;
|
||||||
import net.schmizz.sshj.transport.TransportException;
|
import net.schmizz.sshj.transport.TransportException;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -255,18 +254,4 @@ public class SessionChannel
|
|||||||
throw new SSHRuntimeException("This session channel is all used up");
|
throw new SSHRuntimeException("This session channel is all used up");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@Deprecated
|
|
||||||
public String getOutputAsString()
|
|
||||||
throws IOException {
|
|
||||||
return IOUtils.readFully(getInputStream()).toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@Deprecated
|
|
||||||
public String getErrorAsString()
|
|
||||||
throws IOException {
|
|
||||||
return IOUtils.readFully(getErrorStream()).toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user