Closes this OutputView, closing the underlying writer. And return number bytes in last
memory segment.
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;
	}
252162
public void close() {
		synchronized (this) {
			if (this.closed) {
				return;
			}
			this.closed = true;
		}
		
		this.numRecordsInBuffer = 0;
		this.numRecordsReturned = 0;
		
		// add the full segments to the empty ones
		for (int i = this.fullSegments.size() - 1; i >= 0; i--) {
			this.emptySegments.add(this.fullSegments.remove(i));
		}
		
		// release the memory segment
		this.memoryManager.release(this.emptySegments);
		this.emptySegments.clear();
		
		if (LOG.isDebugEnabled()) {
			LOG.debug("Block Resettable Iterator closed.");
		}
	}
171764
synchronized List<Write> close() {
        List<Write> items = new ArrayList<>(this.writes);
        this.writes.clear();
        this.totalLength = 0;
        this.closed = true;
        return items;
    }
719921
def close(self):
        '''
        
        '''
        #write all that is remained in buffer
        self.flush()
        # delete buffer
        self.__buffer = None
        #reset buffer index to -1 to indicate no where
        self.__bufferidx = -1
        #writing the final empty chunk to the socket
        # send here the data
        self.conn.send("0\r\n")
        self.conn.send("\r\n" )
        #set closed flag
        self.__closed = True
388542
def end_output (self, **kwargs):
        """"""
        if self.has_part("stats"):
            self.write_stats()
        if self.has_part("outro"):
            self.write_outro()
        self.close_fileoutput()
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);
         }
      }
   }
641921
def close(self):
        
        if self._writable and not self._is_raw_of_buffered and not self._closed:
            self._closed = True
            if self._write_buffer:
                self.flush()
369197
def close(self):
        
        logging.debug("closing interface")
        self.closed = True
        self.read_sem.release()
        self.thread.join()
        usb.util.dispose_resources(self.dev)
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");
    }
  }
260142
public List<MemorySegment> close() throws IOException
	{
		// send off set last segment
		writeSegment(getCurrentSegment(), getCurrentPositionInSegment(), true);
		clear();
		
		// close the writer and gather all segments
		final LinkedBlockingQueue<MemorySegment> queue = this.writer.getReturnQueue();
		this.writer.close();
		
		// re-collect all memory segments
		ArrayList<MemorySegment> list = new ArrayList<MemorySegment>(this.numSegments);	
		for (int i = 0; i < this.numSegments; i++) {
			final MemorySegment m = queue.poll();
			if (m == null) {
				// we get null if the queue is empty. that should not be the case if the reader was properly closed.
				throw new RuntimeException("ChannelWriterOutputView: MemorySegments have been taken from return queue by different actor.");
			}
			list.add(m);
		}
		
		return list;
	}
439499
def close(self):
        """"""
        if self._writer is not None:
            self.flush()
            self._writer.close()
            self._writer = None
444871
def close(self):
        
        self._outfile.write(struct.pack('>2h', 4, 0x0400))
        if self._close:
            self._outfile.close()
538973
public void close() throws IOException {
		if (writer != null) {
			writer.close();
		} else if (stream != null) {
			stream.close();
		}
	}
1176222
protected synchronized void close() {

        this.closed = true;

        setReadable(false);
        setWritable(false);
        freeOutputStream();
        freeInputStream();

        this.gzdata = null;
    }
106183
public void close() throws IOException {
		this.accessors.clear();
		if (this.reader != null) {
			this.reader.close();
			this.reader = null;
		}
	}
128823
public static int copyAndCloseBoth(Reader input, Writer output) throws IOException {
		try {
			return copyAndCloseOutput(input, output);
		} finally {
			input.close();
		}
	}
708455
def close(self):
        
        if self.closed is False:
            self.clean()
            try:
                self.writer.write_eof()
            except:
                pass
            self.writer.close()
            self.closed = True
            if self.debug is True:
                print('close')
        if self.debug is True:
            print("closed")