code: public void close() throws IOException {
          if (!closed) {
              finish();
              if (usesDefaultDeflater)
                  def.end();
              out.close();
              closed = true;
          }
      }
docs: Writes remaining compressed data to the output stream and closes the
  underlying stream.
  @exception IOException if an I/O error has occurred