Closes the archive and releases file system resources. No more files or directories may be
added after calling this method.

@throws IOException
on I/O error
420675
public void close() throws IOException {
        if (jarOutputStream != null) {
            jarOutputStream.close();
        }
        else if (os != null) {
            os.close();
        }
    }
1374457
public void close() throws IOException {
        if (fInputStream != null) {
            fInputStream.close();
            fInputStream = null;
            fData = null;
        }
    }
943578
@Override
    public void close()
        throws IOException
    {
        OutputStream os = _os;
        _os = null;

        if (os != null) {
            _state.next(-1);
            os.close();
        }

        _state.println();
    }
1288752
@SuppressWarnings("unchecked")
	public void close() throws IOException {
		if(itr instanceof CloseableIterator) {
			CloseableIterator<E> toBeClosed = (CloseableIterator<E>) itr;
			toBeClosed.close();
		}
	}
1185141
@Override
    public void close () throws IOException {
        try {
            SmbFileHandleImpl h = this.handle;
            if ( h != null ) {
                h.close();
            }
        }
        catch ( SmbException se ) {
            throw seToIoe(se);
        }
        finally {
            this.tmp = null;
            this.handle = null;
            if ( this.unsharedFile ) {
                this.file.close();
            }
        }
    }
339989
@Override
    public void close()
        throws IOException
    {
        InputStream in = _inputSource;

        if (in != null) {
            _inputSource = null;
            if (_autoClose) {
                in.close();
            }
        }
        freeBuffers();
    }
1073532
@Override public void close() throws IOException
   {
      long skippedLast = 0;
      if (m_remaining > 0)
      {
         skippedLast = skip(m_remaining);
         while (m_remaining > 0 && skippedLast > 0)
         {
            skippedLast = skip(m_remaining);
         }
      }
   }
804420
@Override
    public void close() throws IOException {
        if (dataFile != null) {
            //TODO create separate method for this
            if (!append) {
                dataFile.seek(0);
                try (RandomAccessFile rf = new RandomAccessFile(file, "rw")) {
                    rf.getChannel().transferFrom(dataFile.getChannel(), 0, dataFile.length());
                }
            }
            try {
                dataFile.close();
                dataFile = null;
            } catch (Throwable th) {
                //no-op
            }
        }
    }
1329715
public void close() throws IOException {
    LOG.info("Closing the shard writer, processed " + numForms + " forms");
    try {
      try {
        if (maxNumSegments > 0) {
          writer.optimize(maxNumSegments);
          LOG.info("Optimized the shard into at most " + maxNumSegments
              + " segments");
        }
      } finally {
        writer.close();
        LOG.info("Closed Lucene index writer");
      }

      moveFromTempToPerm();
      LOG.info("Moved new index files to " + perm);

    } finally {
      dir.close();
      LOG.info("Closed the shard writer");
    }
  }
402110
@Override
  public void closeImpl() throws IOException
  {
    unlock();

    _fileChannel = null;

    RandomAccessFile file = _file;
    _file = null;

    if (file != null)
      file.close();
  }
77735
@Override
  public void close() throws IOException {
    try {
      mLock.lock();
      if (mAvailableResources.size() != mResources.size()) {
        LOG.warn("{} resources are not released when closing the resource pool.",
            mResources.size() - mAvailableResources.size());
      }
      for (ResourceInternal<T> resourceInternal : mAvailableResources) {
        closeResource(resourceInternal.mResource);
      }
      mAvailableResources.clear();
    } finally {
      mLock.unlock();
    }
    mGcFuture.cancel(true);
  }
84410
@Override
	public synchronized void close() throws IOException {
		// cancel synchronization
		try {
			if (syncTask != null) {
				syncTask.cancel();
			}
			sync();
			unmapFile();
		} finally {
			super.close();
		}
	}
338260
synchronized void close()
   {
      releaseWriterAndReaders();
      if (directory != null)
      {
         try
         {
            directory.close();
         }
         catch (IOException e)
         {
            directory = null;
         }
      }
   }
12973
public void close() throws IOException {
        if(inp != null)
            inp.close();
        if(out != null)
            out.close();
    }
474586
public void close() throws IOException {
        if (!closed) {
            this.finish();
            this.buffer.close();
            out.close();
            closed = true;
        }
    }
219146
@Override
  public final void close()
      throws IOException {
    try {
      // end collection
      writer.writeEndCollection()
          .writeEndDocument()
          .close();
    } catch (XMLStreamException e) {
      throw new IOException(e.getMessage());
    }
  }
343384
@Override
	public void close()
    {
    	// Close filesystem
        try
        {
            if (allocationTableRandomAccessFile != null)
                allocationTableRandomAccessFile.close();
        }
        catch (IOException e)
        {
            log.error("["+descriptor.getName()+"] Could not close allocation table file : "+e.toString());
        }
        try
        {
            if (dataRandomAccessFile != null)
                dataRandomAccessFile.close();
        }
        catch (IOException e)
        {
            log.error("["+descriptor.getName()+"] Could not close map file : "+e.toString());
        }
    }