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

InputStream.nullInputStream() and OutputStream.nullOutputStream()

XMLWordPrintable

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

      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.

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

              Created:
              Updated:
              Resolved: