Name: el35337 Date: 01/13/97
If I create a BufferedReader on the System.in (STDIN) stream
and attempt to read, I get an IO Exception. Here's some sample code
<snip>
BufferedReader input = new BufferedReader
(new InputStreamReader(System.in));
String str=input.readLine();
System.out.println("String is: " + str);
<snip>
When executed, this produces the following exception stack:
<snip>
java.io.IOException
at java.io.BufferedInputStream.available(BufferedInputStream.java:181)
at java.io.InputStreamReader.fill(InputStreamReader.java:216)
at java.io.InputStreamReader.read(InputStreamReader.java:273)
at java.io.BufferedReader.fill(BufferedReader.java:141)
at java.io.BufferedReader.readLine(BufferedReader.java:213)
at intest.main(intest.java:9)
<snip>
Adobe Systems, Inc. ###@###.###
======================================================================
- duplicates
-
JDK-4023791 InputStreamReader does not work on the Win32 console input stream
-
- Closed
-