Hello.

I feel uneasy about performance problem around ByteArrayInputStream , which is 
not Stream but exactly ByteArray ,
as much as compatibility problem .

I want to solve compatibility problem which you  mentioned ,same time when we 
solve performance problem .
I think these information should be posted to JIRA .

Best regards.
.... and good night! It is midnight 1:45 at Tokyo :)

/*

        Tomohito Nakayama
        [EMAIL PROTECTED]
        [EMAIL PROTECTED]
        [EMAIL PROTECTED]

        Naka
        http://www5.ocn.ne.jp/~tomohito/TopPage.html

*/
----- Original Message ----- From: "Daniel John Debrunner" <[EMAIL PROTECTED]>
To: "Derby Development" <[email protected]>
Sent: Friday, October 07, 2005 1:23 AM
Subject: Re: closing ByteArrayInputStream problem (Re: [jira] Commented: (DERBY-596) jdbcapi/resultsetStream.java fails in DerbyNetClient Framework)


TomohitoNakayama wrote:

Hello.

I think we can ignore test which corresponds to differece of 8a9 .

I found that InputStream was not closed .
This is not correct in spec of java.sql.ResultSet .

However, the InputStream was exactly ByteArrayInputStream as shown in
error message .

> FAIL - stream was not closed after a get*() call. class
java.io.ByteArrayInputStream


And Java API spec says that closing ByteArrayInputStream has no effect .
http://java.sun.com/j2se/1.4.2/docs/api/java/io/ByteArrayInputStream.html
   Closing a ByteArrayInputStream has no effect.
    The methods in this class can be called after the stream has been
closed without generating an IOException.

Then the behavior of the program does not differ , wheter InputStream
was closed or not.

I think no problem here .

I think there is a problem, the JDBC spec says the stream is closed
after a getXXX, and in this case, because the close has no affect it
does not appear closed to the application. Thus the application may
continue to use the stream when it shouldn't and that behaviour
might/will change in the future, or may not be consistent now depending
on the stream implementation returned by the driver.

I seem to remember that embedded worked around this by
wrapping/extending  ByteArrayInputStream so that the close did close the
stream.

Dan.





--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.11/121 - Release Date: 2005/10/06





--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.11/121 - Release Date: 2005/10/06

Reply via email to