<!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.BufferedOutputStream
</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.BufferedInputStream.html#_top_">Previous</a>  <a href="java.io.BufferedReader.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.io.BufferedOutputStream
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----<a href="java.io.OutputStream.html#_top_">java.io.OutputStream</a>
           |
           +----<a href="java.io.FilterOutputStream.html#_top_">java.io.FilterOutputStream</a>
                   |
                   +----java.io.BufferedOutputStream
</pre>
<hr>
<dl>
  <dt> public class <b>BufferedOutputStream</b>
  <dt> extends <a href="java.io.FilterOutputStream.html#_top_">FilterOutputStream</a>
</dl>
The class implements a buffered output stream. By setting up such 
 an output stream, an application can write bytes to the underlying 
 output stream without necessarily causing a call to the underlying 
 system for each byte written. The data is written into a buffer, 
 and then written to the underlying stream if the buffer reaches 
 its capacity, the buffer output stream is closed, or the buffer 
 output stream is explicity flushed.
<p>
<hr>
<a name="index"></a>
<h2>
  <img src="images/variable-index.gif" width=207 height=38 alt="Variable Index">
</h2>
<dl>
  <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#buf"><b>buf</b></a>
  <dd>  The buffer where data is stored.
  <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#count"><b>count</b></a>
  <dd>  The number of valid bytes in the buffer.
</dl>
<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="#BufferedOutputStream(java.io.OutputStream)"><b>BufferedOutputStream</b></a>(OutputStream)
  <dd>  Creates a new buffered output stream to write data to the 
 specified underlying output stream with a default 512-byte buffer size.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#BufferedOutputStream(java.io.OutputStream, int)"><b>BufferedOutputStream</b></a>(OutputStream, int)
  <dd>  Creates a new buffered output stream to write data to the 
 specified underlying output stream with the specified buffer size.
</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="#flush()"><b>flush</b></a>()
  <dd>  Flushes this buffered output stream.
  <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 buffered 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 byte to this buffered output stream.
</dl>
<a name="variables"></a>
<h2>
  <img src="images/variables.gif" width=153 height=38 alt="Variables">
</h2>
<a name="buf"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
<b>buf</b>
<pre>
 protected byte buf[]
</pre>
<dl>
  <dd> The buffer where data is stored.<p>
</dl>
<a name="count"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
<b>count</b>
<pre>
 protected int count
</pre>
<dl>
  <dd> The number of valid bytes in the buffer.<p>
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="BufferedOutputStream"></a>
<a name="BufferedOutputStream(java.io.OutputStream)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>BufferedOutputStream</b>
<pre>
 public BufferedOutputStream(<a href="java.io.OutputStream.html#_top_">OutputStream</a> out)
</pre>
<dl>
  <dd> Creates a new buffered output stream to write data to the 
 specified underlying output stream with a default 512-byte buffer size.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> out - the underlying output stream.
  </dl></dd>
</dl>
<a name="BufferedOutputStream(java.io.OutputStream, int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>BufferedOutputStream</b>
<pre>
 public BufferedOutputStream(<a href="java.io.OutputStream.html#_top_">OutputStream</a> out,
                             int size)
</pre>
<dl>
  <dd> Creates a new buffered output stream to write data to the 
 specified underlying output stream with the specified buffer size.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> out - the underlying output stream.
    <dd> size - the buffer size.
  </dl></dd>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<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 synchronized void write(int b) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Writes the specified byte to this buffered output stream.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> b - the byte 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.FilterOutputStream.html#write(int)">write</a> in class <a href="java.io.FilterOutputStream.html#_top_">FilterOutputStream</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 synchronized 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 buffered output stream.
 <p> Ordinarily this method stores bytes from the given array into this
 stream's buffer, flushing the buffer to the underlying output stream as
 needed.  If the requested length is at least as large as this stream's
 buffer, however, then this method will flush the buffer and write the
 bytes directly to the underlying output stream.  Thus redundant
 <code>BufferedOutputStream</code>s will not copy data unnecessarily.
<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.FilterOutputStream.html#write(byte[], int, int)">write</a> in class <a href="java.io.FilterOutputStream.html#_top_">FilterOutputStream</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 buffered output stream. This forces any buffered 
 output bytes to be written out to the underlying output 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.FilterOutputStream.html#flush()">flush</a> in class <a href="java.io.FilterOutputStream.html#_top_">FilterOutputStream</a>
    <dt> <b>See Also:</b>
    <dd> <a href="java.io.FilterOutputStream.html#out">out</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.BufferedInputStream.html#_top_">Previous</a>  <a href="java.io.BufferedReader.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
