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

io exception ,Stream

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Duplicate
    • Affects Version/s: 1.1
    • Fix Version/s: None
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_95

      Description



      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()

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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: