harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei Fedotov" <alexei.fedo...@gmail.com>
Subject Re: [classlib][luni] optimized InputStream reader (HARMONY-5522)
Date Mon, 17 Mar 2008 14:51:58 GMT
I will come with the integration change soon.

On Mon, Mar 17, 2008 at 2:33 PM, Tim Ellison <t.p.ellison@gmail.com> wrote:
> Alexei Fedotov wrote:
>  > As for [1], it seems the following should be done under synchronized
>  > (bais) {}. Imagine the thread will switch right after bais.pos check
>  > and someone will read few bytes from the stream. In this case only a
>  > part of the buffer should be returned.
>  >
>  >         if (bais.pos == 0) {
>  >             bais.skip(bais.buf.length);
>  >             return bais.buf;
>  >         }
>  >
>  > [1] http://issues.apache.org/jira/secure/attachment/12378007/ByteStream.java
>
>  Agreed.
>
>  Tim
>
>



-- 
With best regards,
Alexei

Mime
View raw message