Mike Matrigali wrote:
> I am new to this issue and have not reviewed the patch yet. I am just
> trying to understand what the correct behavior is. If this has
> already been discussed feel free to point that out.I know Sunitha
> submitted some fixes in this area, but she will not be able to look
> at these for awhile.
>
> In your test it is obvious that the first instance of the stream can
> not be used anymore since you use the same variable. What if the
> test instead did:
>
> InputStream is1 = rs.getBinaryStream(1);
> System.out.println("Here goes first stream");
> System.out.println(is1.read());
> System.out.println(is1.read());
> System.out.println(is1.read());
>
> InputStream is2 = rs.getBinaryStream(1);
> System.out.println("Here goes 2nd stream");
> System.out.println(is2.read());
> System.out.println(is2.read());
> System.out.println(is2.read());
>
> System.out.println("Here goes first stream continuing");
> System.out.println(is1.read());
> System.out.println(is1.read());
> System.out.println(is1.read());
The second call to getBinaryStream is required to close the first stream.
Dan.