public abstract class HTTPParser extends Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
_chunked |
protected String |
_connection |
protected long |
_contentLength |
protected String |
_contentType |
protected String |
_host |
protected LineReader |
_reader |
protected String |
_server |
Constructor and Description |
---|
HTTPParser(InputStream is) |
Modifier and Type | Method and Description |
---|---|
long |
getContentLength() |
String |
getContentType() |
LineReader |
getReader() |
protected static String |
getRest(String line,
int index) |
boolean |
isChunked() |
protected void |
parse()
Parses the typical HTTP header.
|
abstract void |
parseHead(String line) |
void |
setInputStream(InputStream in) |
protected String _server
protected String _host
protected String _contentType
protected String _connection
protected long _contentLength
protected boolean _chunked
protected LineReader _reader
public HTTPParser(InputStream is) throws IOException
IOException
public String getContentType()
public long getContentLength()
public boolean isChunked()
public LineReader getReader()
public void setInputStream(InputStream in)
public abstract void parseHead(String line) throws IOException
IOException
protected void parse() throws IOException
IOException
- if a connection fails or bad/incomplete requestCopyright © 2016. All rights reserved.