Destroys the process and closes the BufferedReader.

@param p the process to destroy
@param reader the BufferedReader to close
543170
private void destroy(Process p, BufferedReader reader){
		p.destroy();
		try {
			reader.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
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();
    }
845688
public void shutdown() {
    getLogger().info(getPath() + " shutdown");
    active = false;
    try {
      if (reader != null) {
        reader.close();
        reader = null;
      }
    } catch (IOException ioe) {
      ioe.printStackTrace();
    }
  }
474599
void close(boolean cleanCache) {
        if (!this.closed.getAndSet(true)) {
            // Close storage reader (and thus cancel those reads).
            if (cleanCache) {
                this.executor.execute(() -> {
                    removeAllCacheEntries();
                    log.info("{}: Closed.", this.traceObjectId);
                });
            } else {
                log.info("{}: Closed (no cache cleanup).", this.traceObjectId);
            }
        }
    }
555664
public void destroySelf(){
        if(mPager == null || mPager.getAdapter() == null){
            return;
        }
        InfinitePagerAdapter wrapper = (InfinitePagerAdapter)mPager.getAdapter();
        PagerAdapter adapter = wrapper.getRealAdapter();
        if(adapter!=null){
            adapter.unregisterDataSetObserver(dataChangeObserver);
        }
        removeAllViews();
    }
703916
public void stop() {
        hide();
        running = false;
        Closeables.closeQuitely(reader);
        Closeables.closeQuitely(in);
    }
1259592
private static BufferedReader bufferInput( Reader reader )
    {
        BufferedReader in;
        if( reader instanceof BufferedReader )
        {
            in = (BufferedReader) reader;
        }
        else
        {
            in = new BufferedReader( reader );
        }
        return in;
    }
1001183
@Override
  public final void close()
  {
    try {
      if (_disableClose)
        return;

      if (! _reuseBuffer) {
        if (_tempRead != null) {
          TempBuffer tempBuffer = _tempRead;
          _tempRead = null;

          TempBuffer.free(tempBuffer);
        }
        _readBuffer = null;
      }

      if (_readEncoding != null) {
        Reader reader = _readEncoding;
        _readEncoding = null;
        reader.close();
      }

      if (_source != null && ! _isDisableCloseSource) {
        StreamImpl s = _source;
        _source = null;
        s.close();
      }
    } catch (IOException e) {
      log().log(Level.FINE, e.toString(), e);
    }
  }
362304
public static final void copy(Reader reader, Writer writer, boolean closeReader, boolean closeWriter) throws IOException {
	try {
	    copy(reader, writer, 0xffff, -1);
	}
	finally {
	    if (closeReader) closeEL(reader);
	    if (closeWriter) closeEL(writer);
	}
    }
713285
private static BufferedReader createReader( Process process )
    {
        InputStream inputStream = process.getInputStream();
        InputStreamReader in = new InputStreamReader( inputStream );
        BufferedReader reader = new BufferedReader( in );
        return reader;
    }
106183
public void close() throws IOException {
		this.accessors.clear();
		if (this.reader != null) {
			this.reader.close();
			this.reader = null;
		}
	}
703501
public void readExternal(PofReader reader)
            throws IOException {
        value = reader.readObject(0);
        fReturnOld = reader.readBoolean(1);
    }
781029
public void parse (Reader reader) {
		try {
			char[] data = new char[1024];
			int offset = 0;
			while (true) {
				int length = reader.read(data, offset, data.length - offset);
				if (length == -1) break;
				if (length == 0) {
					char[] newData = new char[data.length * 2];
					System.arraycopy(data, 0, newData, 0, data.length);
					data = newData;
				} else
					offset += length;
			}
			parse(data, 0, offset);
		} catch (IOException ex) {
			throw new SerializationException(ex);
		} finally {
			StreamUtils.closeQuietly(reader);
		}
	}
1120116
public final static String process(final Reader reader, final Configuration configuration) throws IOException
    {
        final Processor p = new Processor(!(reader instanceof BufferedReader) ? new BufferedReader(reader) : reader,
                configuration);
        return p.process();
    }
1216828
private void init(Reader reader) {
		names = new TreeSet<String>();
		failedLines = new LinkedHashMap<Integer,String>();

		BufferedReader br = null;

		try {

			br = new BufferedReader(reader);

			logger.info("Reading ASTRAL file...");

			String line = "";
			int i = 0;
			while ((line = br.readLine()) != null) {
				if (line.startsWith(">")) {
					try {
						String scopId = line.split("\\s")[0].substring(1);
						names.add(scopId);
						if (i % 1000 == 0) {
							logger.debug("Reading ASTRAL line for " + scopId);
						}
						i++;
					} catch (RuntimeException e) {
						failedLines.put(i, line);
						logger.warn("Couldn't read line " + line, e);
					}
				}
			}

			br.close();

		} catch (IOException e) {
			throw new RuntimeException("Couldn't read the input stream ", e);
		} finally {
			if (br != null) {
				try {
					br.close();
				} catch (IOException e) {
					logger.warn("Could not close stream", e);
				}
			}
		}

	}
1136536
public void close() throws KNXMLException
	{
		if (closeReader)
			try {
				r.close();
			}
			catch (final IOException e) {
				throw new KNXMLException(e.getMessage());
			}
	}
1293250
public synchronized void releaseXMLReader(XMLReader reader) {
        // If the reader that's being released is the cached reader
        // for this thread, remove it from the m_isUse list.
        if (m_readers.get() == reader && reader != null) {
            m_inUse.remove(reader);
        }
    }