public class SimpleHttpParser extends Object
SimpleHttpResponse
object that grants access to the response code,
headers and body of the parsed response.
This class can easily be extended to provide more features. However keep in mind that it's primary focus is to
keep parsing as simple as possible.Constructor and Description |
---|
SimpleHttpParser() |
Modifier and Type | Method and Description |
---|---|
SimpleHttpResponse |
readResponse(BufferedReader reader)
Reads from the given
BufferedReader and returns the parsed response in a SimpleHttpResponse
object. |
public SimpleHttpResponse readResponse(BufferedReader reader) throws IOException
BufferedReader
and returns the parsed response in a SimpleHttpResponse
object.reader
- the inputReader to parse the response fromSimpleHttpResponse
a SimpleHttpResponse
object representing the parsed responseIOException
- if unable to read/parse the raw lines of httpCopyright © 1995–2021 Mort Bay Consulting. All rights reserved.