This consumes and closes the input.
343879
@SuppressWarnings("unchecked")
    public static List<TopLevelGdl> parse(Reader input) throws Exception {
        try {
            Scanner lexer = new GdlScanner(input);
            SymbolFactory symbolFactory = new ComplexSymbolFactory();
            Symbol result = new GdlParser(lexer, symbolFactory).parse();
            return (List<TopLevelGdl>) result.value;
        } finally {
            input.close();
        }
    }
406209
@Override
    public void close() throws IOException {
        if (out != null) {
            IOException ex = null;
            try {
                if (position > 0) {
                    if (breakLines && lineLength >= Base64.MAX_LINE_LENGTH) {
                        if (crlf) {
                            out.write(Base64.CR);
                        }
                        out.write(Base64.LF);
                    }

                    int len = Base64.encode3to4(buffer, 0, position, b4, 0, noPadding, alphabet);
                    out.write(b4, 0, len);
                }
                out.flush();
            } catch (IOException e) {
                ex = e;
            }

            try {
                // 2. Actually close the stream
                // Base class both flushes and closes.
                if (close) {
                    out.close();
                }
            } catch (IOException e) {
                if (ex != null) {
                    ex.addSuppressed(e);
                } else {
                    throw e;
                }
            } finally {
                out = null;
            }

            if (ex != null) {
                throw ex;
            }
        }
    }
198663
@Override
    public synchronized void close() {
        final int count = INSTANCE.usageCount.get() - 1;
        if (count <= 0) {
            INSTANCE.usageCount.set(0);
            if (searchingAnalyzer != null) {
                searchingAnalyzer.close();
                searchingAnalyzer = null;
            }
            if (indexReader != null) {
                try {
                    indexReader.close();
                } catch (IOException ex) {
                    LOGGER.trace("", ex);
                }
                indexReader = null;
            }
            queryParser = null;
            indexSearcher = null;
            if (index != null) {
                try {
                    index.close();
                } catch (IOException ex) {
                    LOGGER.trace("", ex);
                }
                index = null;
            }
        }
    }
863628
public void close()
        throws IOException
    {
        InputStream is = _is;
        _is = null;

        if (is != null)
            is.close();

        _state.println();
    }
1054308
def close(self):
        
        self._closing = True
        for i in xrange(self.size):
            self.inq.put(_STOP)
174760
public void close() throws IOException {
                if (channel != null && channel.isOpen()) {
                        channel.close();
                }

                buffer = null;
                channel = null;
                charBuffer = null;
                decoder = null;
                header = null;
        }
421644
protected function safeClose()
    {
        try {
            if (isset($this->input) && $this->input) {
                $this->close();
            }
        } catch (\Exception $e) {
            // Nothing here
        }
    }
302015
function end (input, value) {
  if (value != null) input.push(String(value))
  input.push(null)
}
1309136
public void close() {
		if (this.sock != null)
			try {
				this.sock_in.close();
				this.sock_out.close();
				this.sock.close();
				this.sock=null;
				this.sock_in=null;
				this.sock_out=null;
			} catch (IOException e) {
			}
	}
100964
public void stopAllInputProcessing() {
		ProcessThread threadProcess;
		synchronized (inputStreams) {
			threadProcess = this.threadProcess;
			if( threadProcess != null ) {
				if( threadProcess.running ) {
					threadProcess.requestStop = true;
				} else {
					threadProcess = this.threadProcess = null;
				}
			}
		}

		inputSizeKnown = false;

		if( threadProcess == null ) {
			return;
		}

		long timeout = System.currentTimeMillis()+5000;
		while( threadProcess.running && timeout >= System.currentTimeMillis() ) {
			synchronized (inputStreams) {
				if( threadProcess != this.threadProcess ) {
					throw new RuntimeException("BUG! the thread got modified by anotehr process");
				}
			}

			BoofMiscOps.sleep(100);
		}

		if( timeout < System.currentTimeMillis() )
			throw new RuntimeException("Took too long to stop input processing thread");

		this.threadProcess = null;
	}
660773
public function close()
    {
        $this->buffer       = null;
        $this->length       = null;
        $this->position     = null;
        $this->objectInfo   = null;
    }
515305
public void close() throws IOException {
        if (in != null) {
            try {
                // Clean up
                if (usesDefaultDeflater) {
                    def.end();
                }

                in.close();
            } finally {
                in = null;
            }
        }
    }
453522
public void close() {
        synchronized (this) {
            if (! closing) {
                closing = true;
                try {
                    // Android-changed: Lazily initialized.
                    if (textOut != null) {
                        textOut.close();
                    }
                    out.close();
                }
                catch (IOException x) {
                    trouble = true;
                }
                textOut = null;
                charOut = null;
                out = null;
            }
        }
    }
82108
private void closeInputFile() throws IOException
	{
		myLineReader.close();
		myBufferedReader.close();
		myStreamReader.close();
		myInputStream.close();
	}
880448
@Override
    public final void close() {
        dispose();

        if (this.outputStream != null) {
            try {
                this.outputStream.close();
            } catch (IOException ioe) {
                logger.error("Unable to close output stream.", ioe);
            } finally {
                this.outputStream = null;
            }
        }
    }
838569
private static void close(AudioInputStream input, DataLine dataLine) throws IOException
    {
        dataLine.drain();
        dataLine.flush();
        dataLine.stop();
        dataLine.close();
        input.close();
    }
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();
    }