Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8190279

InputStream.nullInputStream() and OutputStream.nullOutputStream()

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Duplicate
    • P3
    • None
    • None
    • core-libs
    • None

    Description

      InputStream and OutputStream equivalents to /dev/null are very useful for testing. We should consider adding factory methods for these.

      A discussion point is whether they can be singletons, probably not as it may be useful for testing to have read/write throw exceptions when the stream is closed.

      Attachments

        Issue Links

          Activity

            People

              bpb Brian Burkhalter
              alanb Alan Bateman
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: