public class HTTPSession extends Object implements IHTTPSession
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
BUFSIZE |
static int |
MAX_HEADER_SIZE |
static String |
POST_DATA |
| 构造器和说明 |
|---|
HTTPSession(NanoHTTPD httpd,
ITempFileManager tempFileManager,
InputStream inputStream,
OutputStream outputStream) |
HTTPSession(NanoHTTPD httpd,
ITempFileManager tempFileManager,
InputStream inputStream,
OutputStream outputStream,
InetAddress inetAddress) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
execute() |
long |
getBodySize()
Deduce body length in bytes.
|
CookieHandler |
getCookies() |
Map<String,String> |
getHeaders() |
InputStream |
getInputStream() |
Method |
getMethod() |
Map<String,List<String>> |
getParameters() |
Map<String,String> |
getParms()
已过时。
use
getParameters() instead. |
String |
getQueryParameterString() |
String |
getRemoteIpAddress()
Get the remote ip address of the requester.
|
String |
getUri() |
void |
parseBody(Map<String,String> files)
Adds the files in the request body to the files map.
|
public static final int BUFSIZE
public static final int MAX_HEADER_SIZE
public HTTPSession(NanoHTTPD httpd, ITempFileManager tempFileManager, InputStream inputStream, OutputStream outputStream)
public HTTPSession(NanoHTTPD httpd, ITempFileManager tempFileManager, InputStream inputStream, OutputStream outputStream, InetAddress inetAddress)
public void execute()
throws IOException
execute 在接口中 IHTTPSessionIOExceptionpublic CookieHandler getCookies()
getCookies 在接口中 IHTTPSessionpublic final Map<String,String> getHeaders()
getHeaders 在接口中 IHTTPSessionpublic final InputStream getInputStream()
getInputStream 在接口中 IHTTPSessionpublic final Method getMethod()
getMethod 在接口中 IHTTPSession@Deprecated public final Map<String,String> getParms()
getParameters() instead.IHTTPSessiongetParms 在接口中 IHTTPSessionpublic final Map<String,List<String>> getParameters()
getParameters 在接口中 IHTTPSessionpublic String getQueryParameterString()
getQueryParameterString 在接口中 IHTTPSessionpublic final String getUri()
getUri 在接口中 IHTTPSessionpublic long getBodySize()
public void parseBody(Map<String,String> files) throws IOException, NanoHTTPD.ResponseException
IHTTPSessionparseBody 在接口中 IHTTPSessionfiles - map to modifyIOExceptionNanoHTTPD.ResponseExceptionpublic String getRemoteIpAddress()
IHTTPSessiongetRemoteIpAddress 在接口中 IHTTPSessionCopyright © 2012–2020 nanohttpd. All rights reserved.