org.apache.hc.core5.http.io

## Interface HttpMessageParser<T extends MessageHeaders>

- Type Parameters:
    `T` - `MessageHeaders` or a subclass
  All Known Implementing Classes:
    AbstractMessageParser, DefaultHttpRequestParser, DefaultHttpResponseParser

      public interface HttpMessageParser<T extends MessageHeaders>

  Message parser intended to build HTTP message head from an input stream.
  Since:
    4.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `parse(SessionInputBuffer buffer, InputStream inputStream)` Generates an instance of `MessageHeaders` from the given input stream..

- - ### Method Detail

    - #### parse

          T parse(SessionInputBuffer buffer,
                  InputStream inputStream)
           throws IOException,
                  HttpException

      Generates an instance of `MessageHeaders` from the given input stream..
      Parameters:
        `buffer` - Session input buffer
        `inputStream` - Input stream
      Returns:
        HTTP message head or `null` if the input stream has been closed by the opposite endpoint.
      Throws:
        `IOException` - in case of an I/O error
        `HttpException` - in case of HTTP protocol violation

Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.