/// <summary> /// Causes this piped reader to be connected /// to the piped writer <code>src</code>. /// If this object is already connected to some /// other piped writer, an <code>IOException</code> /// is thrown. /// <para> /// If <code>src</code> is an /// unconnected piped writer and <code>snk</code> /// is an unconnected piped reader, they /// may be connected by either the call: /// /// <pre><code>snk.connect(src)</code> </pre> /// </para> /// <para> /// or the call: /// /// <pre><code>src.connect(snk)</code> </pre> /// </para> /// <para> /// The two calls have the same effect. /// /// </para> /// </summary> /// <param name="src"> The piped writer to connect to. </param> /// <exception cref="IOException"> if an I/O error occurs. </exception> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public void connect(PipedWriter src) throws IOException public virtual void Connect(PipedWriter src) { src.Connect(this); }
/// <summary> /// Creates a <code>PipedReader</code> so /// that it is connected to the piped writer /// <code>src</code>. Data written to <code>src</code> /// will then be available as input from this stream. /// </summary> /// <param name="src"> the stream to connect to. </param> /// <exception cref="IOException"> if an I/O error occurs. </exception> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public PipedReader(PipedWriter src) throws IOException public PipedReader(PipedWriter src) : this(src, DEFAULT_PIPE_SIZE) { }
/// <summary> /// Creates a <code>PipedReader</code> so that it is connected /// to the piped writer <code>src</code> and uses the specified /// pipe size for the pipe's buffer. Data written to <code>src</code> /// will then be available as input from this stream. /// </summary> /// <param name="src"> the stream to connect to. </param> /// <param name="pipeSize"> the size of the pipe's buffer. </param> /// <exception cref="IOException"> if an I/O error occurs. </exception> /// <exception cref="IllegalArgumentException"> if {@code pipeSize <= 0}. /// @since 1.6 </exception> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public PipedReader(PipedWriter src, int pipeSize) throws IOException public PipedReader(PipedWriter src, int pipeSize) { InitPipe(pipeSize); Connect(src); }