Class PipeStream


  • public class PipeStream
    extends java.lang.Object
    Pipe stream that pipes output streams into input streams. Implementation based on a shared synchronized queue.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.concurrent.BlockingQueue<java.lang.Integer> queue
      The supporting synchronized queue.
      private static long QUEUE_TIMEOUT
      The queue timeout.
    • Constructor Summary

      Constructors 
      Constructor Description
      PipeStream()
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.InputStream getInputStream()
      Returns a new input stream that can read from the pipe.
      java.io.OutputStream getOutputStream()
      Returns a new output stream that can write into the pipe.
      • Methods inherited from class java.lang.Object

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

      • QUEUE_TIMEOUT

        private static final long QUEUE_TIMEOUT
        The queue timeout.
        See Also:
        Constant Field Values
      • queue

        private final java.util.concurrent.BlockingQueue<java.lang.Integer> queue
        The supporting synchronized queue.
    • Constructor Detail

      • PipeStream

        public PipeStream()
        Constructor.
    • Method Detail

      • getInputStream

        public java.io.InputStream getInputStream()
        Returns a new input stream that can read from the pipe.
        Returns:
        A new input stream that can read from the pipe.
      • getOutputStream

        public java.io.OutputStream getOutputStream()
        Returns a new output stream that can write into the pipe.
        Returns:
        A new output stream that can write into the pipe.