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

InputStream class has methods which dont maintain consistency of return types.

XMLWordPrintable

    • sparc
    • solaris_2.4

      The methods in InputStream for example available() and skip() return different
      types of values. Why? These should be consistent. Both should either return int
      or long. It doesnt make sense calling available() on a huge file on which we might
      want to skip a large number of bytes using a long type.

      This problem of inconsistent types returned by methods in the same class is prevalent
      across all of the classes in java.io.

      Vijay

            mr Mark Reinhold
            vssriniv Vijay Srinivasan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: