Clean up all resources associated with this reader.<B>Highly
recomended.</B>

@throws java.io.IOException
If an error occurs.
174760
public void close() throws IOException {
                if (channel != null && channel.isOpen()) {
                        channel.close();
                }

                buffer = null;
                channel = null;
                charBuffer = null;
                decoder = null;
                header = null;
        }
584560
public final void clear() throws IOException {
        if ((bufferSize == 0) && (out != null))
            // clear() is illegal after any unbuffered output (JSP.5.5)
             throw new IllegalStateException("jsp.error.ise_on_clear");
        if (flushed)
            throw new IOException("jsp.error.attempt_to_clear_flushed_buffer");
        // defect 312981 begin
        //ensureOpen();
    	if (closed) {
    	    throw new IOException("Stream closed");
        }
        // defect 312981 end
        nextChar = 0;
    }
1169544
@Override
    public void close () throws IOException {
        try {
            if ( this.handle.isValid() ) {
                this.handle.close();
            }
        }
        finally {
            this.file.clearAttributeCache();
            this.tmp = null;
        }
    }
741219
void cleanUp() {
    if (threadStarted) {
      return;
    }

    Reference<?> reference;
    while ((reference = queue.poll()) != null) {
      /*
       * This is for the benefit of phantom references. Weak and soft
       * references will have already been cleared by this point.
       */
      reference.clear();
      try {
        ((FinalizableReference) reference).finalizeReferent();
      } catch (Throwable t) {
        logger.log(Level.SEVERE, "Error cleaning up after reference.", t);
      }
    }
  }
1270579
@Override
    public void clear() {
        if (null != this.output) {
            for (int i = 0; i < this.output.length; i++) {
                if (null != this.output[i]) {
                    this.output[i].release();
                    this.output[i] = null;
                }
            }
        }
        this.outputIndex = 0;
        this.bufferedCount = 0;
        this.bytesWritten = 0L;
        this.isClosing = false;
    }
677323
public function cleanUp($allReaders = false)
    {
        $readers = $allReaders ? array_keys($this->readers) : $this->createdReaders;
        foreach ($readers as $id) {
            $this->readers[$id]->getParser()->getStreamReader()->cleanUp();
            unset($this->readers[$id]);
        }

        $this->createdReaders= [];
    }
1229095
public void clean() throws IOException {
    List<Dataset> dataSets = this.datasetFinder.findDatasets();
    this.finishCleanSignal = Optional.of(new CountDownLatch(dataSets.size()));
    for (final Dataset dataset : dataSets) {
      ListenableFuture<Void> future = this.service.submit(new Callable<Void>() {
        @Override
        public Void call() throws Exception {
          if (dataset instanceof CleanableDataset) {
            ((CleanableDataset) dataset).clean();
          }
          return null;
        }
      });
      Futures.addCallback(future, new FutureCallback<Void>() {
        @Override
        public void onFailure(Throwable throwable) {
          DatasetCleaner.this.finishCleanSignal.get().countDown();
          LOG.warn("Exception caught when cleaning " + dataset.datasetURN() + ".", throwable);
          DatasetCleaner.this.throwables.add(throwable);
          Instrumented.markMeter(DatasetCleaner.this.datasetsCleanFailureMeter);
          DatasetCleaner.this.eventSubmitter.submit(RetentionEvents.CleanFailed.EVENT_NAME,
              ImmutableMap.of(RetentionEvents.CleanFailed.FAILURE_CONTEXT_METADATA_KEY,
                  ExceptionUtils.getFullStackTrace(throwable), RetentionEvents.DATASET_URN_METADATA_KEY,
                  dataset.datasetURN()));
        }

        @Override
        public void onSuccess(Void arg0) {
          DatasetCleaner.this.finishCleanSignal.get().countDown();
          LOG.info("Successfully cleaned: " + dataset.datasetURN());
          Instrumented.markMeter(DatasetCleaner.this.datasetsCleanSuccessMeter);
        }
      });
    }
  }
278269
public void clear(){
		this.errors.clearErrorMessages();;

		this.warnings.clear();
		this.infos.clear();

		this.scDir = 0;
		this.scDirUnreadable = 0;
		this.scFiles = 0;
		this.scFilesUnreadable = 0;
	}
1316949
public void clean() throws Exception
    {
        try
        {
            client.delete().forPath(basePath);
        }
        catch ( KeeperException.BadVersionException ignore )
        {
            // ignore - another thread/process got the lock
        }
        catch ( KeeperException.NotEmptyException ignore )
        {
            // ignore - other threads/processes are waiting
        }
    }
437601
public void close() throws IOException {
		if (parser != null) {
			parser.close();
		}
		if (reader != null) {
			reader.close();
		}
	}
153725
public void flush() throws IOException {
		if (printWriter != null) {
			printWriter.flush();
		}

		if (gzipOutputStream != null) {
			gzipOutputStream.flush();
		}
	}
1202783
synchronized void clear() throws IOException
   {
      if (out != null)
      {
         out.close();
         out = null;
      }
      try
      {
         if (dir.fileExists(REDO_LOG))
         {
            dir.deleteFile(REDO_LOG);
         }
      }
      catch (IOException e)
      {
         log.error(e.getLocalizedMessage(), e);
         throw e;
      }
      entryCount = 0;
   }
515305
public void close() throws IOException {
        if (in != null) {
            try {
                // Clean up
                if (usesDefaultDeflater) {
                    def.end();
                }

                in.close();
            } finally {
                in = null;
            }
        }
    }
242292
def clean_up(self):
        """"""
        self.action_buffer = []
        self.sources = {}
        self.doc_to_get = {}
        self.doc_to_update = []
983694
public void clean()
	{

		ChronoFullRevision cfr = firstCFR;
		totalSize = size;
		while (cfr != null) {
			totalSize += cfr.size();
			cfr = cfr.getNext();
		}

		if (totalSize < MAX_STORAGE_SIZE) {
			return;
		}

		cfr = firstCFR;
		while (cfr != null) {
			totalSize += cfr.clean(revisionIndex, 0);
			cfr = cfr.getNext();
		}

		ChronoStorageBlock block;
		while (last != null && totalSize >= MAX_STORAGE_SIZE) {

			// System.out.println("CLEAN " + last.getRevisionIndex());

			// Retrieve previous block
			block = last.getIndexPrev();

			// Subtract size
			if (storage.remove(last.getRevisionIndex()) == null) {
				throw new RuntimeException("VALUE WAS NOT REMOVED FROM STORAGE");
			}
			totalSize -= last.length();
			size += last.length();

			// Delete references
			if (block != null) {
				block.setIndexNext(null);
			}
			last.setIndexPrev(null);

			cfr = last.getChronoFullRevision();
			totalSize += cfr.size()
					- cfr.clean(revisionIndex, last.getRevisionIndex());

			if (last == first) {
				first = null;
			}

			// Set the new last
			last = block;
		}

		
	}
450830
@Override
    public void clear() {
        try {
            warnUnusedOptions();

            if (clean == null || clean.getValue() == Boolean.TRUE) {
                for (ExamSystem sys : subsystems) {
                    sys.clear();
                }
                FileUtils.delete(cache.getCanonicalFile());
            }
        }
        catch (IOException e) {
            // LOG.info("Clearing " + this.toString() + " failed." ,e);
        }
    }
1119002
@Override
    public final void close() {
        if (this.inputReader != null) {
            try {
                this.inputReader.close();
            } catch (IOException ioe) {
                logger.error("Unable to close input reader.", ioe);
            } finally {
                this.inputReader = null;
            }
        }

        dispose();
    }