code: public void close() throws IOException {
  		if (thread.isAlive()) {
  			thread.closed = true;
  			thread.interrupt();
  		}
  
  		if (stream != null) {
  			stream.close();
  		}
  	}
docs: Closes the underlying input stream.