protected class NanoHTTPD.HTTPSession extends Object implements NanoHTTPD.IHTTPSession
| Modifier and Type | Field and Description |
|---|---|
static int |
BUFSIZE |
static int |
MAX_HEADER_SIZE |
| Constructor and Description |
|---|
HTTPSession(NanoHTTPD.TempFileManager tempFileManager,
InputStream inputStream,
OutputStream outputStream) |
HTTPSession(Socket socket,
NanoHTTPD.TempFileManager tempFileManager,
InputStream inputStream,
OutputStream outputStream,
InetAddress inetAddress) |
| Modifier and Type | Method and Description |
|---|---|
void |
execute() |
long |
getBodySize()
Deduce body length in bytes.
|
NanoHTTPD.CookieHandler |
getCookies() |
Map<String,String> |
getHeaders() |
InputStream |
getInputStream() |
NanoHTTPD.Method |
getMethod() |
Map<String,String> |
getParms() |
String |
getQueryParameterString() |
String |
getRemoteHostName()
Get the remote hostname of the requester.
|
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.TempFileManager tempFileManager, InputStream inputStream, OutputStream outputStream)
public HTTPSession(Socket socket, NanoHTTPD.TempFileManager tempFileManager, InputStream inputStream, OutputStream outputStream, InetAddress inetAddress)
public void execute()
throws IOException
execute in interface NanoHTTPD.IHTTPSessionIOExceptionpublic NanoHTTPD.CookieHandler getCookies()
getCookies in interface NanoHTTPD.IHTTPSessionpublic final Map<String,String> getHeaders()
getHeaders in interface NanoHTTPD.IHTTPSessionpublic final InputStream getInputStream()
getInputStream in interface NanoHTTPD.IHTTPSessionpublic final NanoHTTPD.Method getMethod()
getMethod in interface NanoHTTPD.IHTTPSessionpublic final Map<String,String> getParms()
getParms in interface NanoHTTPD.IHTTPSessionpublic String getQueryParameterString()
getQueryParameterString in interface NanoHTTPD.IHTTPSessionpublic final String getUri()
getUri in interface NanoHTTPD.IHTTPSessionpublic long getBodySize()
public void parseBody(Map<String,String> files) throws IOException, NanoHTTPD.ResponseException
NanoHTTPD.IHTTPSessionparseBody in interface NanoHTTPD.IHTTPSessionfiles - map to modifyIOExceptionNanoHTTPD.ResponseExceptionpublic String getRemoteIpAddress()
NanoHTTPD.IHTTPSessiongetRemoteIpAddress in interface NanoHTTPD.IHTTPSessionpublic String getRemoteHostName()
NanoHTTPD.IHTTPSessiongetRemoteHostName in interface NanoHTTPD.IHTTPSessionCopyright © 2012–2020. All rights reserved.