<!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.util.zip.DeflaterOutputStream
</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.util.zip.html">This Package</a>  <a href="java.util.zip.Deflater.html#_top_">Previous</a>  <a href="java.util.zip.GZIPInputStream.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.util.zip.DeflaterOutputStream
</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.util.zip.DeflaterOutputStream
</pre>
<hr>
<dl>
  <dt> public class <b>DeflaterOutputStream</b>
  <dt> extends <a href="java.io.FilterOutputStream.html#_top_">FilterOutputStream</a>
</dl>
This class implements an output stream filter for compressing data in
 the "deflate" compression format. It is also used as the basis for other
 types of compression filters, such as GZIPOutputStream.
<p>
<dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.util.zip.Deflater.html#_top_">Deflater</a>
</dl>
<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>  Output buffer for writing compressed data.
  <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#def"><b>def</b></a>
  <dd>  Compressor for this stream.
</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="#DeflaterOutputStream(java.io.OutputStream)"><b>DeflaterOutputStream</b></a>(OutputStream)
  <dd>  Creates a new output stream with a defaul compressor and buffer size.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#DeflaterOutputStream(java.io.OutputStream, java.util.zip.Deflater)"><b>DeflaterOutputStream</b></a>(OutputStream, Deflater)
  <dd>  Creates a new output stream with the specified compressor and
 a default buffer size.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#DeflaterOutputStream(java.io.OutputStream, java.util.zip.Deflater, int)"><b>DeflaterOutputStream</b></a>(OutputStream, Deflater, int)
  <dd>  Creates a new output stream with the specified compressor and
 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="#close()"><b>close</b></a>()
  <dd>  Writes remaining compressed data to the output stream and closes the
 underlying stream.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#deflate()"><b>deflate</b></a>()
  <dd>  Writes next block of compressed data to the output stream.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#finish()"><b>finish</b></a>()
  <dd>  Finishes writing compressed data to the output stream without closing
 the underlying 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 an array of bytes to the compressed 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 a byte to the compressed output stream.
</dl>
<a name="variables"></a>
<h2>
  <img src="images/variables.gif" width=153 height=38 alt="Variables">
</h2>
<a name="def"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
<b>def</b>
<pre>
 protected <a href="java.util.zip.Deflater.html#_top_">Deflater</a> def
</pre>
<dl>
  <dd> Compressor for this stream.<p>
</dl>
<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> Output buffer for writing compressed data.<p>
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="DeflaterOutputStream"></a>
<a name="DeflaterOutputStream(java.io.OutputStream, java.util.zip.Deflater, int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>DeflaterOutputStream</b>
<pre>
 public DeflaterOutputStream(<a href="java.io.OutputStream.html#_top_">OutputStream</a> out,
                             <a href="java.util.zip.Deflater.html#_top_">Deflater</a> def,
                             int size)
</pre>
<dl>
  <dd> Creates a new output stream with the specified compressor and
 buffer size.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> out - the output stream
    <dd> def - the compressor ("deflater")
    <dd> len - the output buffer size
  </dl></dd>
</dl>
<a name="DeflaterOutputStream(java.io.OutputStream, java.util.zip.Deflater)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>DeflaterOutputStream</b>
<pre>
 public DeflaterOutputStream(<a href="java.io.OutputStream.html#_top_">OutputStream</a> out,
                             <a href="java.util.zip.Deflater.html#_top_">Deflater</a> def)
</pre>
<dl>
  <dd> Creates a new output stream with the specified compressor and
 a default buffer size.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> out - the output stream
    <dd> def - the compressor ("deflater")
  </dl></dd>
</dl>
<a name="DeflaterOutputStream(java.io.OutputStream)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>DeflaterOutputStream</b>
<pre>
 public DeflaterOutputStream(<a href="java.io.OutputStream.html#_top_">OutputStream</a> out)
</pre>
<dl>
  <dd> Creates a new output stream with a defaul compressor and buffer size.
<p>
</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 void write(int b) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Writes a byte to the compressed output stream. This method will
 block until the byte can be written.
<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 has occurred
    <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 void write(byte b[],
                   int off,
                   int len) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Writes an array of bytes to the compressed output stream. This
 method will block until all the bytes are written.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> buf - the data to be written
    <dd> off - the start offset of the data
    <dd> len - the length of the data
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error has occurred
    <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="finish()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="finish"><b>finish</b></a>
<pre>
 public void finish() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Finishes writing compressed data to the output stream without closing
 the underlying stream. Use this method when applying multiple filters
 in succession to the same output stream.
<p>
  <dd><dl>
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error has occurred
  </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> Writes remaining compressed data to the output stream and closes the
 underlying stream.
<p>
  <dd><dl>
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error has occurred
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.FilterOutputStream.html#close()">close</a> in class <a href="java.io.FilterOutputStream.html#_top_">FilterOutputStream</a>
  </dl></dd>
</dl>
<a name="deflate()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="deflate"><b>deflate</b></a>
<pre>
 protected void deflate() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Writes next block of compressed data to the output stream.
<p>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.util.zip.html">This Package</a>  <a href="java.util.zip.Deflater.html#_top_">Previous</a>  <a href="java.util.zip.GZIPInputStream.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
