Closes the file-like object.

    If the file-like object was passed in the init function
    the encrypted stream file-like object does not control
    the file-like object and should not actually close it.
345488
def _Close(self):
    
    if not self._file_object_set_in_init:
      self._file_object.close()
      self._file_object = None

    self._decrypter = None
    self._decrypted_data = b''
    self._encrypted_data = b''
286978
public void close()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "close");

    Enumeration streams = null;
    synchronized (this)
    {
      synchronized (streamTable)
      {
        closed = true;
        closeBrowserSessionsInternal();
        streams = streamTable.elements();
      }
    }
    // since already set closed to true, no more AOStreams will be created and added to the streamTable,
    // even if there is an
    // asynchronous stream creation in progress (the itemStream will be created, but no AOStream will
    // be added to the streamTable).
    while (streams.hasMoreElements())
    {
      StreamInfo sinfo = (StreamInfo) streams.nextElement();
      if (sinfo.stream != null)
      {
        sinfo.stream.close();
      }
    }

    synchronized (streamTable)
    {
      streamTable.clear();
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "close");
  }
609180
@Override
	public void close() throws IOException {
		if (this.in != null) {
			this.in.close();
		}
		if (!this.tempFile.delete()) {
			LOG.warn("Cannot delete tempFile: " + this.tempFile.getAbsolutePath());
			throw new IOException("Cannot delete tempFile: " + this.tempFile.getAbsolutePath());
		}
		;
	}
1065442
public void close() {
        open = false;
        try {
            os.flush();
            if (closeStream)
                os.close();
        }
        catch(IOException ioe) {
            throw new ExceptionConverter(ioe);
        }
    }
1107087
public static void close(@Nullable Object object) throws IOException {
		if (object instanceof Closeable) {
			((Closeable) object).close();
		}
	}
146808
async function close(callback) {
            await closeStream(client.stream);
            await closeStream(client.rpc);
            if (callback) {
                return callback();
            }
        }
745012
private void closeFLACStream() throws IOException {
    //reset position in output stream to beginning.
    //re-write the updated stream info.
    checkForThreadErrors();
    if(DEBUG_LEV > 0)
      System.err.println("FLACEncoder::closeFLACStream : Begin");
    streamLock.lock();
    try {
      if(!flacStreamIsOpen)
        throw new IllegalStateException("Cannot close a non-opened stream");
      byte[] md5Hash = md5.getMD().digest();
      flacWriter.closeFLACStream(md5Hash, streamConfig);
      flacStreamIsOpen = false;
    } finally {
       streamLock.unlock();
    }
  }
1298351
public synchronized void close() throws SecurityException {
        super.close();
        // Unlock any lock file.
        if (lockFileName == null) {
            return;
        }
        try {
            // Closing the lock file's FileOutputStream will close
            // the underlying channel and free any locks.
            lockStream.close();
        } catch (Exception ex) {
            // Problems closing the stream.  Punt.
        }
        synchronized(locks) {
            locks.remove(lockFileName);
        }
        new File(lockFileName).delete();
        lockFileName = null;
        lockStream = null;
    }
1285784
public void close() {
    proc.destroy();
    try {
      inStream.close();
      outStream.close();
      errStream.close();
    } catch (IOException ignored) {
    }
    inStream = null;
    outStream = null;
    errStream = null;
    proc = null;
  }
600221
def close(self):
        

        if self.stream is None:
            return

        try:
            self.stream.isatty()

            if self.stream.name in ["<stdin>", "<stdout>", "<stderr>"]:
                return
        except AttributeError:
            pass
        except ValueError:
            # raised when executing an operation to a closed stream
            pass

        try:
            from _pytest.compat import CaptureIO
            from _pytest.capture import EncodedFile

            if isinstance(self.stream, (CaptureIO, EncodedFile)):
                # avoid closing streams for pytest
                return
        except ImportError:
            pass

        try:
            from ipykernel.iostream import OutStream

            if isinstance(self.stream, OutStream):
                # avoid closing streams for Jupyter Notebook
                return
        except ImportError:
            pass

        try:
            self.stream.close()
        except AttributeError:
            self._logger.logger.warn(
                "the stream has no close method implementation: type={}".format(type(self.stream))
            )
        finally:
            self._stream = None
1369345
function _closeMCrypt()
    {
        if ( $this->encryptStream !== false ) {
            if ( $this->continuousBuffer ) {
                mcrypt_generic_deinit($this->encryptStream);
            }

            mcrypt_module_close($this->encryptStream);

            $this->encryptStream = false;
        }

        if ( $this->decryptStream !== false ) {
            if ( $this->continuousBuffer ) {
                mcrypt_generic_deinit($this->decryptStream);
            }

            mcrypt_module_close($this->decryptStream);

            $this->decryptStream = false;
        }
    }
120007
def _Close(self):
    
    if not self._file_object_set_in_init:
      self._file_object.close()
      self._file_object = None
      self._range_offset = -1
      self._range_size = -1
633475
public function stream_close()
    {
        $this->stream_flush();
        fclose($this->fd);
        $this->path = null;
        $this->fd = null;
    }
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;
            }
        }
    }
731528
def close(self):
    
    if not self._is_open:
      raise IOError('Not opened.')

    if not self._is_cached:
      close_file_object = True
    elif self._resolver_context.ReleaseFileObject(self):
      self._is_cached = False
      close_file_object = True
    else:
      close_file_object = False

    if close_file_object:
      self._Close()
      self._is_open = False
551090
public void closeFLACStream(byte[] md5Hash, StreamConfiguration streamConfig)
      throws IOException {
    //reset position in output stream to beginning.
    //re-write the updated stream info.
    streamLock.lock();
    try {
      if(!flacStreamIsOpen)
        throw new IllegalStateException("Error. Cannot close a non-opened stream");
      StreamConfiguration tempSC = new StreamConfiguration(streamConfig);
      tempSC.setMaxBlockSize(maxBlockSize);
      tempSC.setMinBlockSize(minBlockSize);
      EncodedElement streamInfo =  MetadataBlockStreamInfo.getStreamInfo(
          tempSC, minFrameSize, maxFrameSize, samplesInStream, md5Hash);
      if(out.canSeek()) {
        out.seek(streamHeaderPos);
        this.writeDataToOutput(streamInfo);
      }
      flacStreamIsOpen = false;
      out.close();
    } finally {
       streamLock.unlock();
    }
  }
692063
public void close() throws IOException {
        if (dataStream != null) dataStream.close();
        byteStream = null;
        dataStream = null;
    }