Class BasicLineParser

    • Constructor Detail

      • BasicLineParser

        public BasicLineParser​(ProtocolVersion proto)
        Creates a new line parser for the given HTTP-like protocol.
        Parameters:
        proto - a version of the protocol to parse, or null for HTTP. The actual version is not relevant, only the protocol name.
      • BasicLineParser

        public BasicLineParser()
        Creates a new line parser for HTTP.
    • Method Detail

      • parseHeader

        public Header parseHeader​(CharArrayBuffer buffer)
                           throws ParseException
        Description copied from interface: LineParser
        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.
        Specified by:
        parseHeader in interface LineParser
        Parameters:
        buffer - a buffer holding the full header line.
        Returns:
        the header in the argument buffer.
        Throws:
        ParseException - in case of a parse error