|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectorg.eclipse.jetty.http.HttpParser
public class HttpParser
| 嵌套类摘要 | |
|---|---|
static class |
HttpParser.EventHandler
|
| 字段摘要 | |
|---|---|
protected int |
_chunkLength
|
protected int |
_chunkPosition
|
protected long |
_contentLength
|
protected long |
_contentPosition
|
protected View |
_contentView
|
protected byte |
_eol
|
protected int |
_length
|
protected int |
_state
|
static int |
STATE_CHUNK
|
static int |
STATE_CHUNK_PARAMS
|
static int |
STATE_CHUNK_SIZE
|
static int |
STATE_CHUNKED_CONTENT
|
static int |
STATE_CONTENT
|
static int |
STATE_END
|
static int |
STATE_END0
|
static int |
STATE_END1
|
static int |
STATE_EOF_CONTENT
|
static int |
STATE_FIELD0
|
static int |
STATE_FIELD2
|
static int |
STATE_HEADER
|
static int |
STATE_HEADER_IN_NAME
|
static int |
STATE_HEADER_IN_VALUE
|
static int |
STATE_HEADER_NAME
|
static int |
STATE_HEADER_VALUE
|
static int |
STATE_SEEKING_EOF
|
static int |
STATE_SPACE1
|
static int |
STATE_SPACE2
|
static int |
STATE_START
|
static int |
STATE_STATUS
|
static int |
STATE_URI
|
| 构造方法摘要 | |
|---|---|
HttpParser(Buffer buffer,
HttpParser.EventHandler handler)
Constructor. |
|
HttpParser(Buffers buffers,
EndPoint endp,
HttpParser.EventHandler handler)
Constructor. |
|
| 方法摘要 | |
|---|---|
int |
available()
|
Buffer |
blockForContent(long maxIdleTime)
|
protected int |
fill()
fill the buffers from the endpoint |
Buffer |
getBodyBuffer()
|
long |
getContentLength()
|
long |
getContentRead()
|
Buffer |
getHeaderBuffer()
|
int |
getState()
|
boolean |
inContentState()
|
boolean |
inHeaderState()
|
boolean |
isChunking()
|
boolean |
isComplete()
|
boolean |
isIdle()
|
boolean |
isMoreInBuffer()
|
boolean |
isPersistent()
|
boolean |
isState(int state)
|
void |
parse()
Parse until END state. |
boolean |
parseAvailable()
Parse until END state. |
int |
parseNext()
Parse until next Event. |
void |
reset()
|
void |
returnBuffers()
|
void |
setForceContentBuffer(boolean force)
|
void |
setHeadResponse(boolean head)
Set if a HEAD response is expected |
void |
setPersistent(boolean persistent)
|
void |
setState(int state)
|
String |
toString()
|
String |
toString(Buffer buf)
|
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 字段详细信息 |
|---|
public static final int STATE_START
public static final int STATE_FIELD0
public static final int STATE_SPACE1
public static final int STATE_STATUS
public static final int STATE_URI
public static final int STATE_SPACE2
public static final int STATE_END0
public static final int STATE_END1
public static final int STATE_FIELD2
public static final int STATE_HEADER
public static final int STATE_HEADER_NAME
public static final int STATE_HEADER_IN_NAME
public static final int STATE_HEADER_VALUE
public static final int STATE_HEADER_IN_VALUE
public static final int STATE_END
public static final int STATE_EOF_CONTENT
public static final int STATE_CONTENT
public static final int STATE_CHUNKED_CONTENT
public static final int STATE_CHUNK_SIZE
public static final int STATE_CHUNK_PARAMS
public static final int STATE_CHUNK
public static final int STATE_SEEKING_EOF
protected final View _contentView
protected int _state
protected byte _eol
protected int _length
protected long _contentLength
protected long _contentPosition
protected int _chunkLength
protected int _chunkPosition
| 构造方法详细信息 |
|---|
public HttpParser(Buffer buffer,
HttpParser.EventHandler handler)
public HttpParser(Buffers buffers,
EndPoint endp,
HttpParser.EventHandler handler)
buffers - the buffers to useendp - the endpointhandler - the even handler| 方法详细信息 |
|---|
public long getContentLength()
public long getContentRead()
public void setHeadResponse(boolean head)
head - public int getState()
public boolean inContentState()
public boolean inHeaderState()
public boolean isChunking()
public boolean isIdle()
Parser 中的 isIdlepublic boolean isComplete()
Parser 中的 isComplete
public boolean isMoreInBuffer()
throws IOException
Parser 中的 isMoreInBufferIOExceptionpublic boolean isState(int state)
public boolean isPersistent()
Parser 中的 isPersistentpublic void setPersistent(boolean persistent)
Parser 中的 setPersistent
public void parse()
throws IOException
END state.
If the parser is already in the END state, then it is reset and re-parsed.
IllegalStateException - If the buffers have already been partially parsed.
IOException
public boolean parseAvailable()
throws IOException
current state of the parser.
Parser 中的 parseAvailableIOExceptionparse(),
parseNext()
public int parseNext()
throws IOException
IOException
protected int fill()
throws IOException
IOExceptionpublic void reset()
Parser 中的 resetpublic void returnBuffers()
Parser 中的 returnBufferspublic void setState(int state)
public String toString(Buffer buf)
public String toString()
Object 中的 toStringpublic Buffer getHeaderBuffer()
public Buffer getBodyBuffer()
public void setForceContentBuffer(boolean force)
force - True if a new buffer will be forced to be used for content and the header buffer will not be used.
public Buffer blockForContent(long maxIdleTime)
throws IOException
IOException
public int available()
throws IOException
IOException
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||