/** * 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); }
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); }
internal PassiveInputStream(PipedOutputStream Out) : base(Out) { this.Out=Out; }
internal PassiveInputStream(PipedOutputStream Out, int size) : base(Out, size) { this.Out=Out; }
internal MyPipedInputStream(PipedOutputStream Out, int size) : base(Out) { buffer=new byte[size]; }
internal MyPipedInputStream(PipedOutputStream Out) : base(Out) { }
public virtual Stream getOutputStream() { PipedOutputStream Out=new PipedOutputStream(); io.setInputStream(new PassiveInputStream(Out , 32*1024 ), false); // io.setInputStream(new PassiveInputStream(Out), false); return Out; }