From: "Roly Perera" <###@###.###>
Subject: java.io.InputStream.markSupported()
Date: Wed, 23 Sep 1998 12:13:22 +0100
The specification of this method should probably clarify that, for a
given input stream i, implementations are required to return the same
value each time markSupported() is called. In other words, whether or
not markSupported() is an invariant property of a particular input
stream instance.
I guess this is implicit in the text, but as this is an extremely
important invariant for anyone intending to use mark() and reset(), I
think it should be made explicit.
Another point I should make is that the text "Returns: true if this type
supports the mark and reset method; false otherwise" implies that the
markSupported() property is invariant over _classes_ rather than just
_instances_. I.e., that:
i1.getClass() == i2.getClass() => i1.markSupported() ==
i2.markSupported()
where as the earlier text implies:
i1 == i2 => i1.markSupported() == i2.markSupported()
I suspect the latter of these two constraints is the intended
interpretation (as well as the more flexible). Anyway, whichever
invariant is intended should be made clear in the docs.
Subject: java.io.InputStream.markSupported()
Date: Wed, 23 Sep 1998 12:13:22 +0100
The specification of this method should probably clarify that, for a
given input stream i, implementations are required to return the same
value each time markSupported() is called. In other words, whether or
not markSupported() is an invariant property of a particular input
stream instance.
I guess this is implicit in the text, but as this is an extremely
important invariant for anyone intending to use mark() and reset(), I
think it should be made explicit.
Another point I should make is that the text "Returns: true if this type
supports the mark and reset method; false otherwise" implies that the
markSupported() property is invariant over _classes_ rather than just
_instances_. I.e., that:
i1.getClass() == i2.getClass() => i1.markSupported() ==
i2.markSupported()
where as the earlier text implies:
i1 == i2 => i1.markSupported() == i2.markSupported()
I suspect the latter of these two constraints is the intended
interpretation (as well as the more flexible). Anyway, whichever
invariant is intended should be made clear in the docs.
- duplicates
-
JDK-4176610 Unclear definition of java.io.InputStream.markSupported()
-
- Resolved
-