/[classpath]/classpath/java/util/zip/DeflaterOutputStream.java
ViewVC logotype

Diff of /classpath/java/util/zip/DeflaterOutputStream.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by mark, Tue Jan 22 22:27:02 2002 UTC revision 1.4 by mkoch, Wed May 21 12:20:58 2003 UTC
# Line 76  public class DeflaterOutputStream extend Line 76  public class DeflaterOutputStream extend
76     * <code>def.deflate()</code> until all bytes from the input buffers     * <code>def.deflate()</code> until all bytes from the input buffers
77     * are processed.     * are processed.
78     */     */
79    protected void deflate() throws IOException    protected void deflate () throws IOException
80    {    {
81      while (! def.needsInput())      while (! def.needsInput())
82        {        {
# Line 97  public class DeflaterOutputStream extend Line 97  public class DeflaterOutputStream extend
97     * default buffer size.     * default buffer size.
98     * @param out the output stream where deflated output should be written.     * @param out the output stream where deflated output should be written.
99     */     */
100    public DeflaterOutputStream(OutputStream out)    public DeflaterOutputStream (OutputStream out)
101    {    {
102      this(out, new Deflater(), 512);      this (out, new Deflater (), 512);
103    }    }
104    
105    /**    /**
# Line 108  public class DeflaterOutputStream extend Line 108  public class DeflaterOutputStream extend
108     * @param out the output stream where deflated output should be written.     * @param out the output stream where deflated output should be written.
109     * @param defl the underlying deflater.     * @param defl the underlying deflater.
110     */     */
111    public DeflaterOutputStream(OutputStream out, Deflater defl)    public DeflaterOutputStream (OutputStream out, Deflater defl)
112    {    {
113      this(out, defl, 512);      this (out, defl, 512);
114    }    }
115    
116    /**    /**
# Line 123  public class DeflaterOutputStream extend Line 123  public class DeflaterOutputStream extend
123     */     */
124    public DeflaterOutputStream(OutputStream out, Deflater defl, int bufsize)    public DeflaterOutputStream(OutputStream out, Deflater defl, int bufsize)
125    {    {
126      super(out);      super (out);
127      if (bufsize <= 0)      if (bufsize <= 0)
128        throw new IllegalArgumentException("bufsize <= 0");        throw new IllegalArgumentException("bufsize <= 0");
129      buf = new byte[bufsize];      buf = new byte[bufsize];
# Line 148  public class DeflaterOutputStream extend Line 148  public class DeflaterOutputStream extend
148     * was the only way to ensure that all bytes are flushed in Sun's     * was the only way to ensure that all bytes are flushed in Sun's
149     * JDK.       * JDK.  
150     */     */
151    public void finish() throws IOException    public void finish () throws IOException
152    {    {
153      def.finish();      def.finish();
154      while (! def.finished())      while (! def.finished ())
155        {        {
156          int len = def.deflate(buf, 0, buf.length);          int len = def.deflate(buf, 0, buf.length);
157          if (len <= 0)          if (len <= 0)

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26