private static Logger log = Logger.getLogger(NIOHTTPHelper.class.getName());
public static ByteBuffer readByteBufferFromHttp(InputStream is) throws IOException {
HTTPRequest request = new HTTPRequest();
request.readFrom(is);
if (is.markSupported()) {
is.mark(2);
if (is.read() != -1) {
is.reset();
throw new IOException("bytes left in stream after constructing HTTPRequest");