-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInputTest.java
More file actions
28 lines (24 loc) · 751 Bytes
/
InputTest.java
File metadata and controls
28 lines (24 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package DecoratorPattern.CustomIO;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
public class InputTest {
public static void main(String[] args) {
int c;
try{
InputStream in =
new LowerCaseInputStream(
new BufferedInputStream(
new FileInputStream("DecoratorPattern/CustomIO/test.txt")
)
);
while ((c = in.read()) >= 0) {
System.out.print((char)c);
}
in.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}