Closes this object's {@link #raf RandomAccessFile}. <p>

As a side-effect, the associated <tt>FileChannel</tt> object, if any,
is closed as well.

@throws UnexpectedFileIOException if an <tt>IOException</tt> is thrown
338850
private final void closeRAF() throws LockFile.UnexpectedFileIOException {

        if (raf != null) {
            try {
                raf.close();
            } catch (IOException ex) {
                throw new UnexpectedFileIOException(this, "closeRAF", ex);
            } finally {
                raf = null;
            }
        }
    }
371143
@Override
    public void close() throws IOException {
        if (fis != null) {
            try {
                fis.close();
                fis = null;
            } catch (Throwable th) {
                //no-op
            }
        }
    }
1343777
public void close() throws IOException {
        if (raf != null) {
            // gibt Lock auf datei frei
            try {
                if (this.fileLock != null) {
                    if( !fileLock.release()) {
                  LOG.error("Filelock not release properly");
                    }
                } else {
               LOG.error("No Filelock set");
                }
            } finally {
                // Schliessen der Daten-Datei
                this.fileLock = null;
                raf.close();
                raf = null;
            }
        }
    }
474586
public void close() throws IOException {
        if (!closed) {
            this.finish();
            this.buffer.close();
            out.close();
            closed = true;
        }
    }
435790
private boolean releaseFileLock() {

        // Note:  Closing the super class RandomAccessFile has the
        //        side-effect of closing the file lock's FileChannel,
        //        so we do not deal with this here.
        boolean success = false;

        if (this.fileLock == null) {
            success = true;
        } else {
            try {
                this.fileLock.release();

                success = true;
            } catch (Exception e) {}
            finally {
                this.fileLock = null;
            }
        }

        return success;
    }
217943
@Override
	@SuppressWarnings("checkstyle:magicnumber")
	public void close() throws IOException {
		if (this.stream != null) {
			//End of file (1Ah)
			this.stream.write(0x1A);
			this.stream.close();
			this.stream = null;
		}

		if (this.columns != null) {
			this.columns.clear();
			this.columns = null;
		}
	}
870076
@Override
    public void close() throws Exception
    {
        BufferedWriter writer = null;
        try
        {
            FileWriter fw = new FileWriter(file.getAbsoluteFile());

            writer = new BufferedWriter(fw);

            String header = layout.getFileHeader();
            if (header != null)
            {
                writer.append(header);
            }
            String presentationHeader = layout.getPresentationHeader();
            if (presentationHeader != null)
            {
                writer.append(presentationHeader);
            }
            int len = buffer.length();
            for (int i = 0; i < len; i++)
            {
                ILoggingEvent event = buffer.get();
                writer.append(layout.doLayout(event));
            }

            String presentationFooter = layout.getPresentationFooter();
            if (presentationFooter != null)
            {
                writer.append(presentationFooter);
            }
            String footer = layout.getFileFooter();
            if (footer != null)
            {
                writer.append(footer);
            }
        }
        finally
        {
            if(writer != null)
            {
                writer.flush();
                writer.close();
            }
        }
    }
162941
public void close() throws IOException {
        try {
            file.close();
            tmp = null;
        } catch (SmbException se) {
            throw seToIoe(se);
        }
    }
78331
public void close() throws IOException {
        if (closeRequested)
            return;
        guard.close();
        closeRequested = true;

        synchronized (this) {
            // Close streams, release their inflaters
            synchronized (streams) {
                if (false == streams.isEmpty()) {
                    Map<InputStream, Inflater> copy = new HashMap<>(streams);
                    streams.clear();
                    for (Map.Entry<InputStream, Inflater> e : copy.entrySet()) {
                        e.getKey().close();
                        Inflater inf = e.getValue();
                        if (inf != null) {
                            inf.end();
                        }
                    }
                }
            }

            // Release cached inflaters
            Inflater inf;
            synchronized (inflaterCache) {
                while (null != (inf = inflaterCache.poll())) {
                    inf.end();
                }
            }

            if (jzfile != 0) {
                // Close the zip file
                long zf = this.jzfile;
                jzfile = 0;

                close(zf);
            }

            // Android-changed, explicit delete for OPEN_DELETE ZipFile.
            if (fileToRemoveOnClose != null) {
                fileToRemoveOnClose.delete();
            }
        }
    }
1041292
@Override
  public synchronized void close() throws Exception {
    if (this.fileSystem != null && !this.fsClosed) {
      this.fileSystem.close();
      this.fsClosed = true;
    }
  }
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();
            }
        }
    }
1063196
@Override
    public void closeFile() throws JournalException {
        try {
            super.testStateChange(State.FILE_CLOSED);
            parent.writeDocumentTrailer(xmlWriter);
            xmlWriter.close();

            /*
             * SOME implementations of XMLWriter do not close all resources, so
             * we need to close the rmi manually just in case.
             */
            try {
                writer.close();
            } catch (IOException e) {
                throw new JournalException(e);
            }
            super.setState(State.FILE_CLOSED);
        } catch (XMLStreamException e) {
            throw new JournalException(e);
        }
    }
1083346
private void closeFileObject(ModuleSymbol mod, String typeName, FileObject fileObject) {
        /*
         * If typeName is non-null, the file object was opened as a
         * source or class file by the user.  If a file was opened as
         * a resource, typeName will be null and the file is *not*
         * subject to annotation processing.
         */
        if ((typeName != null)) {
            if (!(fileObject instanceof JavaFileObject))
                throw new AssertionError("JavaFileOject not found for " + fileObject);
            JavaFileObject javaFileObject = (JavaFileObject)fileObject;
            switch(javaFileObject.getKind()) {
            case SOURCE:
                generatedSourceNames.add(typeName);
                generatedSourceFileObjects.add(javaFileObject);
                openTypeNames.remove(typeName);
                break;

            case CLASS:
                generatedClasses.computeIfAbsent(mod, m -> Collections.synchronizedMap(new LinkedHashMap<>())).put(typeName, javaFileObject);
                openTypeNames.remove(typeName);
                break;

            default:
                break;
            }
        }
    }
537040
@Override
  public void close() throws IOException {
    if (!channelIsOpen) {
      logger.atFine().log("Ignoring close: channel for '%s' is not open.", resourceIdString);
      return;
    }
    logger.atFine().log("Closing channel for '%s'", resourceIdString);
    channelIsOpen = false;
    closeContentChannel();
  }
427797
private void closeFile() throws JournalException {
        synchronized (JournalWriter.SYNCHRONIZER) {
            // check to be sure that another thread didn't close the file while
            // we were waiting for the lock.
            if (state == FILE_OPEN) {
                sendRequestToAllTransports(new CloseFileRequest());
                currentSize = 0;
                state = FILE_CLOSED;
            }

            // turn off the timer that is checking the age of this file.
            if (timer != null) {
                timer.cancel();
            }
        }
    }
1288752
@SuppressWarnings("unchecked")
	public void close() throws IOException {
		if(itr instanceof CloseableIterator) {
			CloseableIterator<E> toBeClosed = (CloseableIterator<E>) itr;
			toBeClosed.close();
		}
	}
119080
public void close() throws IOException {
        if (!closed) {
            finish();
            if (usesDefaultDeflater)
                def.end();
            out.close();
            closed = true;
        }
    }