code: public static void addListener(HttpSenderListener listener) {
  		listeners.add(listener);
  		Collections.sort(listeners, getListenersComparator());
  	}
docs: /*
  private void send(HttpMessage msg, boolean isFollowRedirect, HttpOutputStream pipe, byte[]
  buf) throws HttpException, IOException { HttpMethod method = null; HttpResponseHeader
  resHeader = null;
  
  try { method = runMethod(msg, isFollowRedirect); // successfully executed; resHeader =
  HttpMethodHelper.getHttpResponseHeader(method);
  resHeader.setHeader(HttpHeader.TRANSFER_ENCODING, null); //
  replaceAll("Transfer-Encoding: chunked\r\n", ""); msg.setResponseHeader(resHeader);
  msg.getResponseBody().setCharset(resHeader.getCharset()); msg.getResponseBody().setLength(0);
  
  // process response for each listener
  
  pipe.write(msg.getResponseHeader()); pipe.flush();
  
  if (msg.getResponseHeader().getContentLength() >= 0 &&
  msg.getResponseHeader().getContentLength() < 20480) { // save time expanding buffer in
  HttpBody if (msg.getResponseHeader().getContentLength() > 0) {
  msg.getResponseBody().setBody(method.getResponseBody()); pipe.write(msg.getResponseBody());
  pipe.flush();
  
  } } else { //byte[] buf = new byte[4096]; InputStream in = method.getResponseBodyAsStream();
  
  int len = 0; while (in != null && (len = in.read(buf)) > 0) { pipe.write(buf, 0, len);
  pipe.flush();
  
  msg.getResponseBody().append(buf, len); } } } finally { if (method != null) {
  method.releaseConnection(); } } }