/** * Parses the HTTP messages' request-line from the given input stream. * * @param inputStream supplying the request-line * @return request-line * @throws IOException if an error occurs while consuming the stream */ public RequestLine parseRequestLine(InputStream inputStream) throws IOException { return buildRequestLine(parseStartLine(inputStream, InvalidHttpRequest::new, options.ignoreLeadingEmptyLine())); }
/** * Parses a HTTP response's status-line. * * @param inputStream providing the status-line * @return the status-line * @throws InvalidHttpResponse if the status-line is invalid * @throws IOException if an error occurs while consuming the stream */ public StatusLine parseStatusLine(InputStream inputStream) throws IOException { return buildStatusLine(parseStartLine(inputStream, InvalidHttpResponse::new, options.ignoreLeadingEmptyLine())); }
/** * Parses the HTTP messages' request-line from the given input stream. * * @param inputStream supplying the request-line * @return request-line * @throws IOException if an error occurs while consuming the stream */ public RequestLine parseRequestLine(InputStream inputStream) throws IOException { return buildRequestLine(parseStartLine(inputStream, InvalidHttpRequest::new, options.ignoreLeadingEmptyLine())); }
/** * Parses a HTTP response's status-line. * * @param inputStream providing the status-line * @return the status-line * @throws InvalidHttpResponse if the status-line is invalid * @throws IOException if an error occurs while consuming the stream */ public StatusLine parseStatusLine(InputStream inputStream) throws IOException { return buildStatusLine(parseStartLine(inputStream, InvalidHttpResponse::new, options.ignoreLeadingEmptyLine())); }