Class SwitchableInputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    final class SwitchableInputStream
    extends java.io.FilterInputStream
    FilterInputStream which allows a user to change the underlying stream at any time.
    • Field Summary

      • Fields inherited from class java.io.FilterInputStream

        in
    • Constructor Summary

      Constructors 
      Constructor Description
      SwitchableInputStream()
      Creates a new instance without initializing the reference to the underlying stream.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void switchStream​(java.io.InputStream in)
      Creates a new instance with the initial reference to the underlying stream.
      • Methods inherited from class java.io.FilterInputStream

        available, close, mark, markSupported, read, read, read, reset, skip
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SwitchableInputStream

        SwitchableInputStream()
        Creates a new instance without initializing the reference to the underlying stream.
    • Method Detail

      • switchStream

        void switchStream​(java.io.InputStream in)
        Creates a new instance with the initial reference to the underlying stream.