Re: [PATCH][commons-io] Added method for getting InputStream from ByteArrayOutputStream & IOUtils avoiding unnecessary array allocation and copy

2007-11-26 Thread Nikunj Trivedi
Patch Attached. On Nov 26, 2007 8:19 PM, Nikunj Trivedi <[EMAIL PROTECTED]> wrote: > Hi All, > > I have created a Patch having two methods and test cases for both, as > explained below. Any Comments ? > > 1) New Method: ByteArrayOutputStream.toInputStream > ByteArrayOu

[PATCH][commons-io] Added method for getting InputStream from ByteArrayOutputStream & IOUtils avoiding unnecessary array allocation and copy

2007-11-26 Thread Nikunj Trivedi
may not be used since 1) We want FULL buffer, 2) We dont know the size in advance. New method copies InputStream to ByteArrayOutputStream and returns baos.toInputStream(), avoiding unnecessary memory allocation and copy. Testcases are available in respective classes. Regards Nikunj Trivedi