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

InputStream.nullInputStream() and OutputStream.nullOutputStream()

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      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

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

                Dates

                Created:
                Updated:
                Resolved: