Alexei Fedotov wrote:
I see the question. The general InoouttStream cannot be optimized, but
our implementation returns ByteArrayInputStream. We can choose a fast
path without using arraycopy  if we are first to read from this
ByteArrayInputStream object. We just get get a reference to the
underlying buffer and return it without copying the contents. This
works only for unmodified ByteArrayInputStream object, but this is
exactly our case.

Yep, I see that. Now how will you use it (i.e. can you show the code that references ByteStream)? I can see where you are going but want to see the whole picture.

Regards,
Tim

Reply via email to