/// <summary> /// Connects this piped output stream to a receiver. If this object /// is already connected to some other piped input stream, an /// <code>IOException</code> is thrown. /// <para> /// If <code>snk</code> is an unconnected piped input stream and /// <code>src</code> is an unconnected piped output stream, they may /// be connected by either the call: /// <blockquote><pre> /// src.connect(snk)</pre></blockquote> /// or the call: /// <blockquote><pre> /// snk.connect(src)</pre></blockquote> /// The two calls have the same effect. /// /// </para> /// </summary> /// <param name="snk"> the piped input 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 synchronized void connect(PipedInputStream snk) throws IOException public virtual void Connect(PipedInputStream snk) { lock (this) { if (snk == null) { throw new NullPointerException(); } else if (Sink != null || snk.Connected) { throw new IOException("Already connected"); } Sink = snk; snk.@in = -1; snk.@out = 0; snk.Connected = true; } }
/// <summary> /// Connects this piped output stream to a receiver. /// </summary> public void connect(PipedInputStream @snk) { }
/// <summary> /// Creates a piped output stream connected to the specified piped /// input stream. /// </summary> public PipedOutputStream(PipedInputStream @snk) { }
/// <summary> /// Creates a piped output stream connected to the specified piped /// input stream. Data bytes written to this stream will then be /// available as input from <code>snk</code>. /// </summary> /// <param name="snk"> The piped input 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 PipedOutputStream(PipedInputStream snk) throws IOException public PipedOutputStream(PipedInputStream snk) { Connect(snk); }