Uploaded image for project: 'Commons VFS'
  1. Commons VFS
  2. VFS-704

Some providers wrap their input/output streams twice in a BufferedInputStream

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.3
    • 2.5.0
    • None

    Description

      "DefaultFileContent.getInputStream" gets the input stream from the "fileObject" and then wraps it in "FileContentInputStream" which inherits from "MonitorInputStream" which in turn is a "BufferedInputStream". But some providers return input streams which are already "MonitorInputStream" - e.g. "FtpInputStream" and "HttpInputStream". Which means that they get wrapped twice in a "BufferedInputStream" which is needless waste of memory.

      P.S. The same actually applies for output streams - "FtpOutputStream" e.g.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              boris-petrov Boris Petrov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: