Tom Tromey <[EMAIL PROTECTED]> writes:

> What should it print?
> 
> With libgcj (and thus the shared-with-Classpath ByteArrayOutputStream)
> it prints:
> 
>     2
>     2
> 
> Sun's JDK 1.2.2 also prints this.
> 
> The appended patch changes this to work the way I think it ought to
> work.  However, I'm reluctant to check this in.  Maybe it is just a
> bug in the docs.  Or maybe I'm reading too much into the close()
> documentation.
> 
> Tom

According to the Fundamental Classes Reference, none of the methods of
ByteArrayOutputStream throw an IOException because the data is written
to an array instead of an actual I/O device.  It's possibly more
interesting to check if there is a difference between the two
(sun/gcj) if you check the size of the array returned from toCharArray
() before and after the close.

Brian
-- 
Brian Jones <[EMAIL PROTECTED]>

_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to