org.apache.commons.httpclient
public class HttpParser extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static Header[] |
parseHeaders(java.io.InputStream is)
Deprecated.
use #parseHeaders(InputStream, String)
|
static Header[] |
parseHeaders(java.io.InputStream is,
java.lang.String charset)
Parses headers from the given stream.
|
static java.lang.String |
readLine(java.io.InputStream inputStream)
Deprecated.
use #readLine(InputStream, String)
|
static java.lang.String |
readLine(java.io.InputStream inputStream,
java.lang.String charset)
Read up to "\n" from an (unchunked) input stream.
|
static byte[] |
readRawLine(java.io.InputStream inputStream)
Return byte array from an (unchunked) input stream.
|
public static byte[] readRawLine(java.io.InputStream inputStream)
throws java.io.IOException
null is returned.inputStream - the stream to read fromjava.io.IOException - if an I/O problem occurspublic static java.lang.String readLine(java.io.InputStream inputStream,
java.lang.String charset)
throws java.io.IOException
null is returned.inputStream - the stream to read fromcharset - charset of HTTP protocol elementsjava.io.IOException - if an I/O problem occurspublic static java.lang.String readLine(java.io.InputStream inputStream)
throws java.io.IOException
null is returnedinputStream - the stream to read fromjava.io.IOException - if an I/O problem occurspublic static Header[] parseHeaders(java.io.InputStream is, java.lang.String charset) throws java.io.IOException, HttpException
is - the stream to read headers fromcharset - the charset to use for reading the datajava.io.IOException - if an IO error occurs while reading from the streamHttpException - if there is an error parsing a header valuepublic static Header[] parseHeaders(java.io.InputStream is) throws java.io.IOException, HttpException
is - the stream to read headers fromjava.io.IOException - if an IO error occurs while reading from the streamHttpException - if there is an error parsing a header value