Class DemuxInputStream

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class DemuxInputStream
    extends InputStream
    Data written to this stream is forwarded to a stream that has been associated with this thread.
    • Constructor Detail

      • DemuxInputStream

        public DemuxInputStream()
    • Method Detail

      • bindStream

        public InputStream bindStream​(InputStream input)
        Binds the specified stream to the current thread.
        Parameters:
        input - the stream to bind
        Returns:
        the InputStream that was previously active
      • read

        public int read()
                 throws IOException
        Reads byte from stream associated with current thread.
        Specified by:
        read in class InputStream
        Returns:
        the byte read from stream
        Throws:
        IOException - if an error occurs