public void read(InputStream is, OutputStream os) throws InterruptedRequestException, InvalidRequestException, InvalidMethodException, IOException, URISyntaxException {
    String requestLine = Utils.readLine(is);
    if (requestLine == null) throw new InterruptedRequestException("No request line was received");
    String line;
    while (!StringUtils.isBlank(line = Utils.readLine(is))) setHeader(line.trim());
    parseRequest(requestLine);
    if (getHeader("Content-Length") != null) {
      int len = 0;
      try {
        len = Integer.parseInt(getHeader("Content-Length").getValue());
      } catch (NumberFormatException e) {
        throw new InvalidHeaderException("Invalid value for Content-Length");
      }
      if (len > 0) {
        byte[] buffer = new byte[len];
        is.read(buffer);
        setBody(buffer);
      }
    }
  }