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

FileCacheImageOutputStream.seek(long) does not throw EOFException

    XMLWordPrintable

Details

    • beta2
    • generic
    • generic

    Description



      Name: mlR10151 Date: 03/29/2001



      The description for the FileCacheImageOutputStream.seek(long pos)
      says:

      . . .
      Throws:
                  EOFException - if the end of the stream is passed.
      . . .

      But it goes without any exception:
      ===================== a.java =======================
      import java.io.*;
      import javax.imageio.stream.FileCacheImageOutputStream;

      public class a {
          public static void main (String argv[]) throws Exception {
              OutputStream ostream = new ByteArrayOutputStream();
              FileCacheImageOutputStream fcios = new FileCacheImageOutputStream(ostream, null);
              try {
                  fcios.seek(10);
                  System.out.println("Failed");
              } catch (EOFException e) {
                  System.out.println("Passed");
              }
          }
      }
      ===================== log =======================
      java version "1.4.0-internal"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-internal-b57)
      Java HotSpot(TM) Client VM (build 1.4.0-beta-b57, mixed mode)
      Failed

      This bug causes failure of the new JCK test
      api/javax_imageio/stream/FileCacheImageOutputStream/index.html#seek

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

      Attachments

        Issue Links

          Activity

            People

              dricesunw Daniel Rice (Inactive)
              mlsunw Ml Ml (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: