protected class NanoHTTPD.HTTPSession extends java.lang.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,
java.io.InputStream inputStream,
java.io.OutputStream outputStream) |
HTTPSession(NanoHTTPD.TempFileManager tempFileManager,
java.io.InputStream inputStream,
java.io.OutputStream outputStream,
java.net.InetAddress inetAddress) |
| Modifier and Type | Method and Description |
|---|---|
void |
execute() |
long |
getBodySize()
Deduce body length in bytes.
|
NanoHTTPD.CookieHandler |
getCookies() |
java.util.Map<java.lang.String,java.lang.String> |
getHeaders() |
java.io.InputStream |
getInputStream() |
NanoHTTPD.Method |
getMethod() |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getParameters() |
java.util.Map<java.lang.String,java.lang.String> |
getParms()
Deprecated.
use
getParameters() instead. |
java.lang.String |
getQueryParameterString() |
java.lang.String |
getRemoteHostName()
Get the remote hostname of the requester.
|
java.lang.String |
getRemoteIpAddress()
Get the remote ip address of the requester.
|
java.lang.String |
getUri() |
void |
parseBody(java.util.Map<java.lang.String,java.lang.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, java.io.InputStream inputStream, java.io.OutputStream outputStream)
public HTTPSession(NanoHTTPD.TempFileManager tempFileManager, java.io.InputStream inputStream, java.io.OutputStream outputStream, java.net.InetAddress inetAddress)
public void execute()
throws java.io.IOException
execute in interface NanoHTTPD.IHTTPSessionjava.io.IOExceptionpublic NanoHTTPD.CookieHandler getCookies()
getCookies in interface NanoHTTPD.IHTTPSessionpublic final java.util.Map<java.lang.String,java.lang.String> getHeaders()
getHeaders in interface NanoHTTPD.IHTTPSessionpublic final java.io.InputStream getInputStream()
getInputStream in interface NanoHTTPD.IHTTPSessionpublic final NanoHTTPD.Method getMethod()
getMethod in interface NanoHTTPD.IHTTPSession@Deprecated public final java.util.Map<java.lang.String,java.lang.String> getParms()
getParameters() instead.NanoHTTPD.IHTTPSessiongetParms in interface NanoHTTPD.IHTTPSessionpublic final java.util.Map<java.lang.String,java.util.List<java.lang.String>> getParameters()
getParameters in interface NanoHTTPD.IHTTPSessionpublic java.lang.String getQueryParameterString()
getQueryParameterString in interface NanoHTTPD.IHTTPSessionpublic final java.lang.String getUri()
getUri in interface NanoHTTPD.IHTTPSessionpublic long getBodySize()
public void parseBody(java.util.Map<java.lang.String,java.lang.String> files)
throws java.io.IOException,
NanoHTTPD.ResponseException
NanoHTTPD.IHTTPSessionparseBody in interface NanoHTTPD.IHTTPSessionfiles - map to modifyjava.io.IOExceptionNanoHTTPD.ResponseExceptionpublic java.lang.String getRemoteIpAddress()
NanoHTTPD.IHTTPSessiongetRemoteIpAddress in interface NanoHTTPD.IHTTPSessionpublic java.lang.String getRemoteHostName()
NanoHTTPD.IHTTPSessiongetRemoteHostName in interface NanoHTTPD.IHTTPSession