public class HttpResponseDecoder extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
HttpResponseDecoder.Step |
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
MAX_LENGTH_OF_HEADER
头部,最多有多少字节
|
static int |
MAX_LENGTH_OF_HEADERLINE
头部,每行最大的字节数
|
static int |
MAX_LENGTH_OF_RESPONSELINE
请求行的最大长度
|
| 构造器和说明 |
|---|
HttpResponseDecoder() |
| 限定符和类型 | 方法和说明 |
|---|---|
static org.tio.http.common.HttpResponse |
decode(ByteBuffer buffer,
int limit,
int position,
int readableLength,
org.tio.core.ChannelContext channelContext) |
static void |
decodeParams(Map<String,Object[]> params,
String queryString,
String charset,
org.tio.core.ChannelContext channelContext) |
static boolean |
parseHeaderLine(ByteBuffer buffer,
Map<String,String> headers,
int headerLength)
解析请求头的每一行
|
static org.tio.http.common.ResponseLine |
parseResponseLine(ByteBuffer buffer,
org.tio.core.ChannelContext channelContext)
parse response line(the first line)
|
public static final int MAX_LENGTH_OF_HEADER
public static final int MAX_LENGTH_OF_HEADERLINE
public static final int MAX_LENGTH_OF_RESPONSELINE
public static org.tio.http.common.HttpResponse decode(ByteBuffer buffer, int limit, int position, int readableLength, org.tio.core.ChannelContext channelContext) throws org.tio.core.exception.TioDecodeException
buffer - limit - position - readableLength - channelContext - org.tio.core.exception.TioDecodeExceptionpublic static void decodeParams(Map<String,Object[]> params, String queryString, String charset, org.tio.core.ChannelContext channelContext)
params - queryString - charset - channelContext - public static boolean parseHeaderLine(ByteBuffer buffer, Map<String,String> headers, int headerLength) throws org.tio.core.exception.TioDecodeException
org.tio.core.exception.TioDecodeExceptionpublic static org.tio.http.common.ResponseLine parseResponseLine(ByteBuffer buffer, org.tio.core.ChannelContext channelContext) throws org.tio.core.exception.TioDecodeException
org.tio.core.exception.TioDecodeExceptionCopyright © 2022. All rights reserved.