mirror of
https://github.com/Snailclimb/JavaGuide
synced 2025-06-16 18:10:13 +08:00
commit
3783714365
@ -118,8 +118,8 @@ BufferedReader bufferedReader = new BufferedReader(isr);
|
|||||||
|
|
||||||
```java
|
```java
|
||||||
public class InputStreamReader extends Reader {
|
public class InputStreamReader extends Reader {
|
||||||
//用于解码的对象
|
//用于解码的对象
|
||||||
private final StreamDecoder sd;
|
private final StreamDecoder sd;
|
||||||
public InputStreamReader(InputStream in) {
|
public InputStreamReader(InputStream in) {
|
||||||
super(in);
|
super(in);
|
||||||
try {
|
try {
|
||||||
@ -130,7 +130,7 @@ public class InputStreamReader extends Reader {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 使用 StreamDecoder 对象做具体的读取工作
|
// 使用 StreamDecoder 对象做具体的读取工作
|
||||||
public int read() throws IOException {
|
public int read() throws IOException {
|
||||||
return sd.read();
|
return sd.read();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user