# Class GZIPOutputStream

java.lang.Object
java.io.OutputStream
com.codename1.io.gzip.FilterOutputStream
com.codename1.io.gzip.DeflaterOutputStream
com.codename1.io.gzip.GZIPOutputStream

All Implemented Interfaces:
  `AutoCloseable`

public class GZIPOutputStream extends DeflaterOutputStream

- ## Field Summary

  ### Fields inherited from class DeflaterOutputStream

  `buffer, DEFAULT_BUFSIZE, deflater, mydeflater`
  Modifier and Type
  Field
  Description
  `protected byte[]`
  `buffer`
  `protected static final int`
  `DEFAULT_BUFSIZE`
  `protected final Deflater`
  `deflater`
  `protected boolean`
  `mydeflater`

  ### Fields inherited from class FilterOutputStream

  `out`
  Modifier and Type
  Field
  Description
  `protected OutputStream`
  `out`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GZIPOutputStream(OutputStream out)`
  `GZIPOutputStream(OutputStream out, int size)`
  `GZIPOutputStream(OutputStream out, int size, boolean closeOut)`
  `GZIPOutputStream(OutputStream out, Deflater deflater, int size, boolean closeOut)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `getCRC()`
  `void`
  `setComment(String comment)`
  `void`
  `setModifiedTime(long mtime)`
  `void`
  `setName(String name)`
  `void`
  `setOS(int os)`

  ### Methods inherited from class DeflaterOutputStream

  `close, deflate, finish, flush, getDeflater, getSyncFlush, getTotalIn, getTotalOut, setSyncFlush, write, write`
  Modifier and Type
  Method
  Description
  `void`
  `close()`
  Closes this output stream and releases any system resources associated with this stream.
  `protected int`
  `deflate(int flush)`
  `void`
  `finish()`
  `void`
  `flush()`
  Flushes this output stream and forces any buffered output bytes to be written out.
  `Deflater`
  `getDeflater()`
  `boolean`
  `getSyncFlush()`
  `long`
  `getTotalIn()`
  `long`
  `getTotalOut()`
  `void`
  `setSyncFlush(boolean syncFlush)`
  `void`
  `write(byte[] b, int off, int len)`
  Writes len bytes from the specified byte array starting at offset off to this output stream.
  `void`
  `write(int b)`
  Writes the specified byte to this output stream.

  ### Methods inherited from class FilterOutputStream

  `write`
  Modifier and Type
  Method
  Description
  `void`
  `write(byte[] b)`
  Writes b.length bytes from the specified byte array to this output stream.

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
  Modifier and Type
  Method
  Description
  `protected Object`
  `clone()`
  `boolean`
  `equals(Object obj)`
  Indicates whether some other object is "equal to" this one.
  `final Class`
  `getClass()`
  Returns the runtime class of an object.
  `int`
  `hashCode()`
  Returns a hash code value for the object.
  `final void`
  `notify()`
  Wakes up a single thread that is waiting on this object's monitor.
  `final void`
  `notifyAll()`
  Wakes up all threads that are waiting on this object's monitor.
  `String`
  `toString()`
  Returns a string representation of the object.
  `final void`
  `wait()`
  Causes current thread to wait until another thread invokes the method or the method for this object.
  `final void`
  `wait(long timeout)`
  Causes current thread to wait until either another thread invokes the method or the method for this object, or a specified amount of time has elapsed.
  `final void`
  `wait(long timeout, int nanos)`
  Causes current thread to wait until another thread invokes the method or the method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.

- ## Constructor Details

  - ### GZIPOutputStream

    public GZIPOutputStream(OutputStream out) throws IOException
    Throws:
      `IOException`

  - ### GZIPOutputStream

    public GZIPOutputStream(OutputStream out, int size) throws IOException
    Throws:
      `IOException`

  - ### GZIPOutputStream

    public GZIPOutputStream(OutputStream out, int size, boolean closeOut) throws IOException
    Throws:
      `IOException`

  - ### GZIPOutputStream

    public GZIPOutputStream(OutputStream out, Deflater deflater, int size, boolean closeOut) throws IOException
    Throws:
      `IOException`

- ## Method Details

  - ### setModifiedTime

    public void setModifiedTime(long mtime) throws GZIPException
    Throws:
      `GZIPException`

  - ### setOS

    public void setOS(int os) throws GZIPException
    Throws:
      `GZIPException`

  - ### setName

    public void setName(String name) throws GZIPException
    Throws:
      `GZIPException`

  - ### setComment

    public void setComment(String comment) throws GZIPException
    Throws:
      `GZIPException`

  - ### getCRC

    public long getCRC() throws GZIPException
    Throws:
      `GZIPException`