code: @Override
  	public boolean apply(final HttpResponse httpResponse) {
  		try {
  			final InputStream content = httpResponse.getEntity().getContent();
  			int count = 0;
  			for(int i = BINARY_CHECK_SCAN_LENGTH; i-- != 0;) {
  				final int b = content.read();
  				if (b == -1) return false;
  				if (b == 0 && ++count == THRESHOLD) return true;
  			}
  		}
  		catch(final IOException shouldntReallyHappen) {
  			throw new RuntimeException(shouldntReallyHappen);
  		}
  		return false;
  	}
docs: This method implements a simple heuristic for guessing whether a page is binary.
  
  <P>The first {@link #BINARY_CHECK_SCAN_LENGTH} bytes are scanned: if we find more than
  {@link #THRESHOLD} zeroes, we deduce that this page is binary. Note that this works
  also with UTF-8, as no UTF-8 legal character encoding contains these characters (unless
  you're encoding 0, but this is not our case).
  
  @return <code>true</code> if this page has most probably a binary content.
  @throws NullPointerException if the page has no byte content.