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

[io] create memory efficient ThreadableInputStream

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • None
    • None
    • None
    • None
    • Operating System: other
      Platform: Other

    • 36352

    Description

      A org.apache.commons.io.input.ThreadableInputStream that extends
      java.io.ByteArrayInputStream.

      The idea is that for example a large font in itext (22 MB of arialuni.ttf) is
      only loaded once into ONE byte[] buf and many threads can have their
      ThreadableInputStreams spawned on the same read-only 'buf' without duplicating
      that buf in the memory. They just would have each their own set of mark, pos,
      count int's to remain thread-safe.

      It may be related to DemuxInputStream and javax.mail.internet.SharedInputStream .

      Attachments

        Activity

          People

            Unassigned Unassigned
            ralfhauser Ralf Hauser
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: