1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-08-13 17:03:45 -04:00

Support reader.readLine()

This commit is contained in:
Reinhard Pointner 2016-08-02 21:23:47 +08:00
parent 91ec67f77d
commit 4f4f90ecdc

View File

@ -6,6 +6,7 @@ import static net.filebot.Logging.*;
import static net.filebot.media.XattrMetaInfo.*;
import static net.filebot.util.StringUtilities.*;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
@ -286,7 +287,7 @@ public abstract class ScriptShellBaseClass extends Script {
public void telnet(String host, int port, Closure<?> handler) throws IOException {
try (Socket socket = new Socket(host, port)) {
handler.call(new PrintStream(socket.getOutputStream(), true, "UTF-8"), new InputStreamReader(socket.getInputStream(), "UTF-8"));
handler.call(new PrintStream(socket.getOutputStream(), true, "UTF-8"), new BufferedReader(new InputStreamReader(socket.getInputStream(), "UTF-8")));
}
}