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

IOUtils#toBufferedOutputStream/toBufferedWriter to conditionally wrap the output

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5
    • Component/s: None
    • Labels:
      None

      Description

      Might be worth providing output analogues of IOUtils#toBufferedReader().

      i.e., if the OutputStream or Writer is not buffered, then wrap it in the corresponding Buffered... class.

      Unfortunately, the input method name toBufferedInputStream is already in use, and does not perform the equivalent conversion of an InputStream.

      The new methods could use a different prefix, e.g.

      asBufferedOutputStream, asBufferedWriter.
      Could then create the equivalent input methods and deprecate toBufferedReader in favour of asBufferedReader.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                sebb Sebb
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: