| java.lang.Object org.apache.commons.httpclient.HttpParser
HttpParser | public class HttpParser (Code) | | A utility class for parsing http header values according to
RFC-2616 Section 4 and 19.3.
author: Michael Becke author: Oleg Kalnichevski since: 2.0beta1 |
parseHeaders | public static Header[] parseHeaders(InputStream is, String charset) throws IOException, HttpException(Code) | | Parses headers from the given stream. Headers with the same name are not
combined.
Parameters: is - the stream to read headers from Parameters: charset - the charset to use for reading the data an array of headers in the order in which they were parsed throws: IOException - if an IO error occurs while reading from the stream throws: HttpException - if there is an error parsing a header value since: 3.0 |
parseHeaders | public static Header[] parseHeaders(InputStream is) throws IOException, HttpException(Code) | | Parses headers from the given stream. Headers with the same name are not
combined.
Parameters: is - the stream to read headers from an array of headers in the order in which they were parsed throws: IOException - if an IO error occurs while reading from the stream throws: HttpException - if there is an error parsing a header value |
readLine | public static String readLine(InputStream inputStream, String charset) throws IOException(Code) | | Read up to "\n" from an (unchunked) input stream.
If the stream ends before the line terminator is found,
the last part of the string will still be returned.
If no input data available, null is returned.
Parameters: inputStream - the stream to read from Parameters: charset - charset of HTTP protocol elements throws: IOException - if an I/O problem occurs a line from the stream since: 3.0 |
readLine | public static String readLine(InputStream inputStream) throws IOException(Code) | | Read up to "\n" from an (unchunked) input stream.
If the stream ends before the line terminator is found,
the last part of the string will still be returned.
If no input data available, null is returned
Parameters: inputStream - the stream to read from throws: IOException - if an I/O problem occurs a line from the stream |
readRawLine | public static byte[] readRawLine(InputStream inputStream) throws IOException(Code) | | Return byte array from an (unchunked) input stream.
Stop reading when "\n" terminator encountered
If the stream ends before the line terminator is found,
the last part of the string will still be returned.
If no input data available, null is returned.
Parameters: inputStream - the stream to read from throws: IOException - if an I/O problem occurs a byte array from the stream |
|
|