<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.io.PipedOutputStream
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.io.html">This Package</a>  <a href="java.io.PipedInputStream.html#_top_">Previous</a>  <a href="java.io.PipedReader.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.io.PipedOutputStream
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----<a href="java.io.OutputStream.html#_top_">java.io.OutputStream</a>
           |
           +----java.io.PipedOutputStream
</pre>
<hr>
<dl>
  <dt> public class <b>PipedOutputStream</b>
  <dt> extends <a href="java.io.OutputStream.html#_top_">OutputStream</a>
</dl>
A piped output stream is the sending end of a communications 
 pipe. Two threads can communicate by having one thread send data 
 through a piped output stream and having the other thread read the 
 data through a piped input stream.
<p>
<dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.io.PipedInputStream.html#_top_">PipedInputStream</a>
</dl>
<hr>
<a name="index"></a>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#PipedOutputStream()"><b>PipedOutputStream</b></a>()
  <dd>  Creates a piped output stream that is not yet connected to a 
 piped input stream.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#PipedOutputStream(java.io.PipedInputStream)"><b>PipedOutputStream</b></a>(PipedInputStream)
  <dd>  Creates a piped output stream connected to the specified piped 
 input stream.
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#close()"><b>close</b></a>()
  <dd>  Closes this piped output stream and releases any system resources 
 associated with this stream.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#connect(java.io.PipedInputStream)"><b>connect</b></a>(PipedInputStream)
  <dd>  Connects this piped output stream to a receiver.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#flush()"><b>flush</b></a>()
  <dd>  Flushes this output stream and forces any buffered output bytes 
 to be written out.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#write(byte[], int, int)"><b>write</b></a>(byte[], int, int)
  <dd>  Writes <code>len</code> bytes from the specified byte array 
 starting at offset <code>off</code> to this piped output stream.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#write(int)"><b>write</b></a>(int)
  <dd>  Writes the specified <code>byte</code> to the piped output stream.
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="PipedOutputStream"></a>
<a name="PipedOutputStream(java.io.PipedInputStream)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>PipedOutputStream</b>
<pre>
 public PipedOutputStream(<a href="java.io.PipedInputStream.html#_top_">PipedInputStream</a> snk) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Creates a piped output stream connected to the specified piped 
 input stream.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> snk - The piped input stream to connect to.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="PipedOutputStream()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>PipedOutputStream</b>
<pre>
 public PipedOutputStream()
</pre>
<dl>
  <dd> Creates a piped output stream that is not yet connected to a 
 piped input stream. It must be connected to a piped input stream, 
 either by the receiver or the sender, before being used.
<p>
  <dd><dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.io.PipedInputStream.html#connect(java.io.PipedOutputStream)">connect</a>, <a href="#connect(java.io.PipedInputStream)">connect</a>
  </dl></dd>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="connect(java.io.PipedInputStream)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="connect"><b>connect</b></a>
<pre>
 public void connect(<a href="java.io.PipedInputStream.html#_top_">PipedInputStream</a> snk) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Connects this piped output stream to a receiver.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> snk - the piped output stream to connect to.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="write(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="write"><b>write</b></a>
<pre>
 public void write(int b) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Writes the specified <code>byte</code> to the piped output stream.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> b - the <code>byte</code> to be written.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.OutputStream.html#write(int)">write</a> in class <a href="java.io.OutputStream.html#_top_">OutputStream</a>
  </dl></dd>
</dl>
<a name="write(byte[], int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="write"><b>write</b></a>
<pre>
 public void write(byte b[],
                   int off,
                   int len) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Writes <code>len</code> bytes from the specified byte array 
 starting at offset <code>off</code> to this piped output stream.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> b - the data.
    <dd> off - the start offset in the data.
    <dd> len - the number of bytes to write.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.OutputStream.html#write(byte[], int, int)">write</a> in class <a href="java.io.OutputStream.html#_top_">OutputStream</a>
  </dl></dd>
</dl>
<a name="flush()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="flush"><b>flush</b></a>
<pre>
 public synchronized void flush() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Flushes this output stream and forces any buffered output bytes 
 to be written out. 
 This will notify any readers that bytes are waiting in the pipe.
<p>
  <dd><dl>
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.OutputStream.html#flush()">flush</a> in class <a href="java.io.OutputStream.html#_top_">OutputStream</a>
  </dl></dd>
</dl>
<a name="close()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="close"><b>close</b></a>
<pre>
 public void close() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Closes this piped output stream and releases any system resources 
 associated with this stream.
<p>
  <dd><dl>
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.OutputStream.html#close()">close</a> in class <a href="java.io.OutputStream.html#_top_">OutputStream</a>
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.io.html">This Package</a>  <a href="java.io.PipedInputStream.html#_top_">Previous</a>  <a href="java.io.PipedReader.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
