[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ByteArrayOutputStream.close

From: Brian Jones
Subject: Re: ByteArrayOutputStream.close
Date: 16 Nov 2000 22:11:06 -0500
User-agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7

Tom Tromey <address@hidden> 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 Jones <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]