We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f1c4aa1 commit e5e4cf7Copy full SHA for e5e4cf7
client/src/main/java/com/taobao/arthas/client/IOUtil.java
@@ -2,6 +2,7 @@
2
3
import java.io.IOException;
4
import java.io.InputStream;
5
+import java.io.InputStreamReader;
6
import java.io.OutputStream;
7
import java.io.Writer;
8
@@ -41,12 +42,13 @@ public void run() {
41
42
@Override
43
public void run() {
44
try {
45
+ InputStreamReader reader = new InputStreamReader(remoteInput);
46
while (true) {
- int singleByte = remoteInput.read();
- if (singleByte < 0) {
47
+ int singleChar = reader.read();
48
+ if (singleChar == -1) {
49
break;
50
}
- localOutput.write(singleByte);
51
+ localOutput.write(singleChar);
52
localOutput.flush();
53
54
} catch (IOException e) {
0 commit comments