code: public synchronized void finish() {
          if (!isFinished) {
              if (LOGGER.isLoggable(Level.FINE)) {
                  LOGGER.fine("Finished writing matrix in MATLAB_SPARSE format "
                              + "with " + curColumn + " columns");
              }
              isFinished = true;
              matrixWriter.close();
          }
      }
docs: {@inheritDoc} Once this method has been called, any subsequent calls will
  have no effect and will not throw an exception.