code: protected byte[] peekContent(Resource resource) throws IOException {
  		byte[] bbuffer = new byte[Math.max(sniffLength, MINIMUM_SNIFF_BUFFER_SIZE)];
  		String encoding = resource.getHeader("content-encoding");
  		// use larger readlimit, because gzip-ed data can be larger than the original
  		// at low compression level.
  		resource.mark(sniffLength + 100);
  		if (encoding != null) {
  			Resource decoded = DecodingResource.forEncoding(encoding, resource);
  			if (decoded != null) {
  				decoded.read(bbuffer, 0, sniffLength);
  				resource.reset();
  				return bbuffer;
  			}
  		}
  		resource.read(bbuffer, 0, sniffLength);
  		resource.reset();
  		return bbuffer;
  	}
docs: Read first {@code sniffLength} bytes of {@code resource}'s payload,
  decoding {@code Content-Encoding} if any. Reset {@code resource}'s
  read position back to zero.
  @param resource Resource to load bytes from
  @return bytes, zero-padded if payload is shorter.
  @throws IOException