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

io exception ,Stream

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 1.1
    • tools
    • None
    • x86
    • windows_95



      Name: el35337 Date: 01/17/97


      consider the following java program:

      import java.io.*;

      public class StreamTokenizerCat {
          public static void main(String [] argv) throws IOException {
              StreamTokenizer t = new StreamTokenizer(System.in);
              while (t.nextToken() != StreamTokenizer.TT_EOF)
              System.out.println(t);
          }
      }

      under solaris 2.4 jdk 1.1 beta2, this works fine.
      under windows 95 jdk 1.1 beta2, i get the following traceback:

      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 java.io.StreamTokenizer.nextToken(StreamTokenizer.java:287)
      at StreamTokenizerCat.main(StreamTokenizerCat.java:6)

      i believe you can reproduce this bug by simply calling the available method
      of System.in as the first thing in main()

      ======================================================================

            mr Mark Reinhold
            elarsen Erik Larsen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: