Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4024901

exception occurs in Stdin using BurreredReader on Win32

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_95

      Description

       
      masayoshi.okutsu@Eng 1997-01-09
      The description below is from Fujitsu. Note that the description includes
      EUCJIS characters.
      --
        On windows environment, exception occurs in Stdin using
      BurreredReader.


        Source program

      import java.io.*;

      public class a{
          public static void main(String[] args){
              InputStreamReader InputSR = new InputStreamReader(System.in);
              BufferedReader BufRead = new BufferedReader(InputSR);
              try{
                  System.out.print("Stdin a letter > ");
                  int i = BufRead.read();
                  System.out.println("Stdout a letter > "+new Character((char)i));
              }
              catch(IOException e){
                  e.printStackTrace();
              }
          }
      }


        Execution result

      - PC
      [F:\TEMP\io]java a
      Stdin a letter > 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.read(BufferedReader.java:158)
          at a.main(a.java:9)

      [F:\TEMP\io]

      - Solaris
      % java a
      Stdin a letter > ñó // 'ñó'ñ‘©¢Óãž–¤
      Stdout a letter > ñó
      %

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mr Mark Reinhold
                Reporter:
                okutsu Masayoshi Okutsu
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: