public class JlHttpContext extends Context
| 限定符和类型 | 字段和说明 |
|---|---|
protected Map<String,List<UploadedFile>> |
_fileMap |
| 构造器和说明 |
|---|
JlHttpContext(HTTPServer.Request request,
HTTPServer.Response response) |
| 限定符和类型 | 方法和说明 |
|---|---|
InputStream |
bodyAsStream() |
protected void |
commit() |
long |
contentLength() |
String |
contentType() |
protected void |
contentTypeDoSet(String contentType) |
NvMap |
cookieMap() |
void |
cookieSet(String key,
String val,
String domain,
String path,
int maxAge) |
List<UploadedFile> |
files(String key) |
void |
flush() |
void |
headerAdd(String key,
String val) |
NvMap |
headerMap() |
void |
headerSet(String key,
String val) |
String |
ip() |
String |
method() |
void |
output(byte[] bytes) |
void |
output(InputStream stream) |
OutputStream |
outputStream() |
String |
param(String key) |
String |
param(String key,
String def) |
NvMap |
paramMap() |
Map<String,List<String>> |
paramsMap() |
String[] |
paramValues(String key) |
String |
path() |
String |
protocol() |
String |
queryString() |
void |
redirect(String url) |
void |
redirect(String url,
int code) |
Object |
request() |
Object |
response() |
int |
status() |
protected void |
statusDoSet(int status) |
URI |
uri() |
String |
url() |
accept, action, attr, attr, attrClear, attrMap, attrSet, attrSet, body, body, bodyAsBytes, bodyNew, bodyNew, charset, close, contentType, contentTypeNew, controller, cookie, cookie, cookieRemove, cookieSet, cookieSet, cookieSet, current, file, forward, getHandled, getLocale, getRendered, header, header, isMultipart, isMultipartFormData, output, output, outputAsFile, outputAsFile, outputAsHtml, outputAsJson, paramAsBean, paramAsDecimal, paramAsDecimal, paramAsDouble, paramAsDouble, paramAsInt, paramAsInt, paramAsLong, paramAsLong, paramsAdd, paramSet, pathAsUpper, pathMap, pathNew, pathNew, protocolAsUpper, realIp, remoting, remotingSet, render, render, renderAndReturn, session, session, sessionAsDouble, sessionAsDouble, sessionAsInt, sessionAsInt, sessionAsLong, sessionAsLong, sessionClear, sessionId, sessionRemove, sessionSet, sessionState, sessionStateInit, setHandled, setLocale, setRendered, status, statusSet, userAgentprotected Map<String,List<UploadedFile>> _fileMap
public JlHttpContext(HTTPServer.Request request, HTTPServer.Response response)
public long contentLength()
contentLength 在类中 Contextpublic String contentType()
contentType 在类中 Contextpublic String queryString()
queryString 在类中 Contextpublic InputStream bodyAsStream() throws IOException
bodyAsStream 在类中 ContextIOExceptionpublic String[] paramValues(String key)
paramValues 在类中 Contextpublic List<UploadedFile> files(String key) throws Exception
protected void contentTypeDoSet(String contentType)
contentTypeDoSet 在类中 Contextpublic OutputStream outputStream() throws IOException
outputStream 在类中 ContextIOExceptionpublic void output(InputStream stream)
protected void statusDoSet(int status)
statusDoSet 在类中 Contextpublic void flush()
throws IOException
flush 在类中 ContextIOExceptionprotected void commit()
throws IOException
commit 在类中 ContextIOExceptionCopyright © 2022. All rights reserved.