Interface LineParser

All Known Implementing Classes:
BasicLineParser, LazyLaxLineParser, LazyLineParser

public interface LineParser
Interface for parsing lines in the HEAD section of an HTTP message. There are individual methods for parsing a request line, a status line, or a header line. Instances of this interface are expected to be stateless and thread-safe.
Since:
4.0
  • Method Details

    • parseRequestLine

      RequestLine parseRequestLine(CharArrayBuffer buffer) throws ParseException
      Parses a request line from the given buffer containing one line of text.
      Parameters:
      buffer - a buffer holding a line to parse
      Returns:
      the parsed request line
      Throws:
      ParseException - in case of a parse error
    • parseStatusLine

      StatusLine parseStatusLine(CharArrayBuffer buffer) throws ParseException
      Parses a status line from the given buffer containing one line of text.
      Parameters:
      buffer - a buffer holding a line to parse
      Returns:
      the parsed status line
      Throws:
      ParseException - in case of a parse error
    • parseHeader

      Header parseHeader(CharArrayBuffer buffer) throws ParseException
      Parses a header from the given buffer containing one line of text. The full header line is expected here. Header continuation lines must be joined by the caller before invoking this method.
      Parameters:
      buffer - a buffer holding the full header line.
      Returns:
      the header in the argument buffer.
      Throws:
      ParseException - in case of a parse error