/**
  * Creates a <code>PipedInputStream</code> so
  * that it is connected to the piped output
  * stream <code>src</code>. Data bytes written
  * to <code>src</code> will then be  available
  * as input from this stream.
  *
  * @param      src   the stream to connect to.
  * @exception  IOException  if an I/O error occurs.
  */
 public PipedInputStream(PipedOutputStream src)
 {
     connect(src);
 }
示例#2
0
 public override void close()
 {
     if(Out!=null)
     {
         this.Out.close();
     }
     Out=null;
 }
 /**
  * Causes this piped input stream to be connected
  * to the piped  output stream <code>src</code>.
  * If this object is already connected to some
  * other piped output  stream, an <code>IOException</code>
  * is thrown.
  * <p>
  * If <code>src</code> is an
  * unconnected piped output stream and <code>snk</code>
  * is an unconnected piped input stream, they
  * may be connected by either the call:
  * <p>
  * <pre><code>snk.connect(src)</code> </pre>
  * <p>
  * or the call:
  * <p>
  * <pre><code>src.connect(snk)</code> </pre>
  * <p>
  * The two
  * calls have the same effect.
  *
  * @param      src   The piped output stream to connect to.
  * @exception  IOException  if an I/O error occurs.
  */
 public virtual void connect(PipedOutputStream src)
 {
     src.connect(this);
 }
示例#4
0
 internal PassiveInputStream(PipedOutputStream Out)
     : base(Out)
 {
     this.Out=Out;
 }
示例#5
0
 internal PassiveInputStream(PipedOutputStream Out, int size)
     : base(Out, size)
 {
     this.Out=Out;
 }
示例#6
0
 internal MyPipedInputStream(PipedOutputStream Out, int size)
     : base(Out)
 {
     buffer=new byte[size];
 }
示例#7
0
 internal MyPipedInputStream(PipedOutputStream Out)
     : base(Out)
 {
 }
示例#8
0
 public virtual Stream getOutputStream()
 {
     PipedOutputStream Out=new PipedOutputStream();
     io.setInputStream(new PassiveInputStream(Out
         , 32*1024
         ), false);
     //  io.setInputStream(new PassiveInputStream(Out), false);
     return Out;
 }