Uploaded image for project: 'Commons IO'
  1. Commons IO
  2. IO-549

Make ByteArrayOutputStream.toBufferedInputStream public

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.5
    • None
    • Streams/Writers

    Description

      I'm working on a project where I need to aggregate a lot of data in memory. To do this I'm using GzipOutputStream backed by org.apache.commons.io.output.ByteArrayOutputStream. After the aggregation is done I eventually will read the data back out. I'm trying to avoid byte[] buffer copies to reduce the memory usage. ByteArrayOutputStream.toBufferedInputStream seems like the perfect way to do this, but it's a private method. I would only call it after I'm done writing to the ByteArrayOutputStream object. Is there any reason I shouldn't use this method? Could it be made public? Thanks!

      Attachments

        Activity

          People

            Unassigned Unassigned
            robreeves Rob Reeves
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified