public class NtHttpContext extends XContext
| 限定符和类型 | 字段和说明 |
|---|---|
protected ByteArrayOutputStream |
_outputStream |
| 构造器和说明 |
|---|
NtHttpContext(io.netty.channel.ChannelHandlerContext channel,
io.netty.handler.codec.http.FullHttpRequest request,
io.netty.handler.codec.http.FullHttpResponse response) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
body() |
InputStream |
bodyAsStream() |
void |
charset(String charset) |
protected void |
commit() |
long |
contentLength() |
String |
contentType() |
void |
contentType(String contentType) |
String |
cookie(String key) |
String |
cookie(String key,
String def) |
XMap |
cookieMap() |
void |
cookieSet(String key,
String val,
String domain,
String path,
int maxAge) |
List<XFile> |
files(String key) |
String |
header(String key) |
String |
header(String key,
String def) |
XMap |
headerMap() |
void |
headerSet(String key,
String val) |
String |
ip() |
String |
method() |
void |
output(InputStream stream) |
void |
output(String str) |
OutputStream |
outputStream() |
String |
param(String key) |
String |
param(String key,
String def) |
XMap |
paramMap() |
String[] |
paramValues(String key) |
String |
path() |
String |
protocol() |
void |
redirect(String url) |
void |
redirect(String url,
int code) |
Object |
request() |
Object |
response() |
int |
status() |
void |
status(int status) |
URI |
uri() |
String |
url() |
attr, attrClear, attrSet, attrSet, close, cookieRemove, cookieSet, cookieSet, current, file, getHandled, isMultipart, isMultipartFormData, output, outputAsHtml, outputAsJson, paramAsDouble, paramAsDouble, paramAsEntity, paramAsInt, paramAsInt, paramAsLong, paramAsLong, paramSet, pathAsUpper, pathMap, protocolAsUpper, render, render, session, sessionClear, sessionId, sessionSet, sessionState, sessionStateInit, setHandled, userAgentprotected ByteArrayOutputStream _outputStream
public NtHttpContext(io.netty.channel.ChannelHandlerContext channel,
io.netty.handler.codec.http.FullHttpRequest request,
io.netty.handler.codec.http.FullHttpResponse response)
public long contentLength()
contentLength 在类中 XContextpublic String contentType()
contentType 在类中 XContextpublic String body() throws IOException
body 在类中 XContextIOExceptionpublic InputStream bodyAsStream() throws IOException
bodyAsStream 在类中 XContextIOExceptionpublic String[] paramValues(String key)
paramValues 在类中 XContextpublic void contentType(String contentType)
contentType 在类中 XContextpublic OutputStream outputStream() throws IOException
outputStream 在类中 XContextIOExceptionpublic void output(InputStream stream)
protected void commit()
throws IOException
commit 在类中 XContextIOExceptionCopyright © 2019. All rights reserved.