call-seq:
    close( footer = true )

 Close the appender and writes the layout footer to the logging
 destination if the _footer_ flag is set to +true+. Log events will
 no longer be written to the logging destination after the appender
 is closed.
431833
def close( footer = true )
    return self if @closed
    ::Logging::Appenders.remove(@name)
    @closed = true

    flush

    if footer
      footer = @layout.footer
      unless footer.nil? || footer.empty?
        begin
          write(footer)
        rescue StandardError => err
          ::Logging.log_internal_error(err)
        end
      end
    end
    self
  end
28284
def close(self):
        
        if self.parent:
            self.parent.update(self.parent.offset + self.offset)
            return
        self.output.write("\n")
        self.output.flush()
398423
def _close(self):
        

        self.document.appendChild(self.fact_list)
        self.file.write(self.document.toxml(encoding='utf-8'))
        return super(XMLWriter, self)._close()
400469
def close_page(self):
        """"""
        if self.suffix is not None:
            self._current_page.append(self.suffix)
        self._pages.append('\n'.join(self._current_page))

        if self.prefix is not None:
            self._current_page = [self.prefix]
            self._count = len(self.prefix) + 1 # prefix + newline
        else:
            self._current_page = []
            self._count = 0
479268
public function footer()
    {
        if ($this->failures) {
            $this->output->write($this->getCountString($this->failures, true));
            $this->output->write(',');
        }

        $this->output->write($this->getCountString($this->successes, false));
        $this->output->writeln(sprintf(' (%d total)', $this->failures + $this->successes));
    }
1035707
def closeLog(self):
        
        self._logPtr.close()
        if self._namePtr:
            self._namePtr.close()
        self.log = 0
1251653
def close(self, **kwargs):
        
        self.keep_running = False
        if self.sock:
            self.sock.close(**kwargs)
            self.sock = None
467783
def close_log(log_file):
    
    sys.stdout = sys.__stdout__
    if log_file is not None:
        log_file.close()
        del log_file
157933
def end_table_footer(self):
        """

        if self.foot:
            msg = "Table already has a foot"
            raise TableError(msg)

        self.foot = True

        self.append(Command('endfoot'))
348020
def close_logs(self) -> None:
        
        if self.stdout is not None:
            self.stdout.close()
            self.stdout = None
        if self.stderr is not None and self.stderr != subprocess.STDOUT:
            self.stderr.close()
            self.stderr = None
104624
def close_log(log, verbose=True):
    

    if verbose:
        print('Closing log file:', log.name)

    # Send closing message.
    log.info('The log file has been closed.')

    # Remove all handlers from log.
    [log.removeHandler(handler) for handler in log.handlers]
419070
public void close() throws IOException {
        if (r != null) {
            r = null;
            ogg.close();
            ogg = null;
        }
        if (w != null) {
            w.bufferPacket(info.write(), true);
            w.bufferPacket(tags.write(), false);
            
            // The Granule Position on each Ogg Page needs to be
            //  the total number of PCM samples, including the last
            //  full Opus Packet in the page.
            // See https://wiki.xiph.org/OggOpus#Granule_Position

            final List<OpusAudioData> packets = writtenPackets;
            final int packetsSize = packets.size();
            final int maxPacketsPerPage = this.maxPacketsPerPage;

            OpusAudioData packet;
            int pageSize = 0;
            int pageSamples = 0;
            long lastGranule = 0;
            boolean doneFlush = false;
            boolean flushAfter = false;
            for (int i = 0; i < packetsSize; i++) {
                packet = packets.get(i);
                flushAfter = false;
                pageSize++;
                
                // Should we flush before this packet?
                if (maxPacketsPerPage == -1) {
                    // User is handling granule positions
                    // Do we need to flush for them?
                    if (packet.getGranulePosition() >= 0 &&
                            lastGranule != packet.getGranulePosition()) {
                        w.flush();
                        lastGranule = packet.getGranulePosition();
                        w.setGranulePosition(lastGranule);
                        doneFlush = true;
                    }
                } else {
                    // We are doing the granule position
                    
                    // Will we need to flush after this packet?
                    if (pageSize >= maxPacketsPerPage) {
                        flushAfter = true;
                    }
                
                    // Calculate the packet granule
                    pageSamples += packet.getNumberOfSamples();
                    packet.setGranulePosition(lastGranule+pageSamples);
                }

                // Write the data, flushing if needed
                w.bufferPacket(packet.write());
                if (flushAfter || w.getSizePendingFlush() > 16384) {
                    lastGranule = packet.getGranulePosition();
                    w.setGranulePosition(lastGranule);
                    
                    if (i != packetsSize-1) {
                        w.flush();
                        doneFlush = true;
                    }
                }
                if (doneFlush) {   
                    pageSize = 0;
                    pageSamples = 0;
                }
            }

            w.close();
            w = null;
            ogg.close();
            ogg = null;
        }
    }
873982
protected void closeInitialInclude() throws XMLStreamException {

    LOGGER.trace("Closing xi:include");
    int eventType = -1;
    // we ascend the XML until the initial include is closed.
    while (this.depth > 0) {
      eventType = this.mainReader.next();
      if (eventType == XMLStreamConstants.START_ELEMENT) {
        LOGGER.trace("Closing loop: Start {}", this.mainReader.getLocalName());
        this.depth++;
      } else if (eventType == XMLStreamConstants.END_ELEMENT) {
        LOGGER.trace("Closing loop: End {}", this.mainReader.getLocalName());
        this.depth--;
      }
    }
    LOGGER.trace("Closing xi:include complete");
  }
883991
def close(self, end_time=None):
        
        super(Subsegment, self).close(end_time)
        self.parent_segment.decrement_ref_counter()
169743
@Override
	public int close() throws IOException {
		if (!writer.isClosed()) {
			int currentPositionInSegment = getCurrentPositionInSegment();
			// write last segment
			writer.writeBlock(getCurrentSegment());
			clear();

			writer.getReturnQueue().clear();
			this.writer.close();

			return currentPositionInSegment;
		}
		return -1;
	}
1036784
def close(self):
        
        if self.leave:
            if self.last_print_n < self.n:
                cur_t = time.time()
                self.sp.print_status(format_meter(self.n, self.total, cur_t-self.start_t, self.ncols, self.prefix, self.unit, self.unit_format, self.ascii))
            self.file.write('\n')
        else:
            self.sp.print_status('')
            self.file.write('\r')
931513
def close(self):
        
        if self.closed:
            return

        if self.mode in "aw":
            self.fileobj.write(NUL * (BLOCKSIZE * 2))
            self.offset += (BLOCKSIZE * 2)
            # fill up the end with zero-blocks
            # (like option -b20 for tar does)
            blocks, remainder = divmod(self.offset, RECORDSIZE)
            if remainder > 0:
                self.fileobj.write(NUL * (RECORDSIZE - remainder))

        if not self._extfileobj:
            self.fileobj.close()
        self.closed = True