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.IHTTPSession
java.io.IOException
public NanoHTTPD.CookieHandler getCookies()
getCookies
in interface NanoHTTPD.IHTTPSession
public final java.util.Map<java.lang.String,java.lang.String> getHeaders()
getHeaders
in interface NanoHTTPD.IHTTPSession
public final java.io.InputStream getInputStream()
getInputStream
in interface NanoHTTPD.IHTTPSession
public 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.IHTTPSession
getParms
in interface NanoHTTPD.IHTTPSession
public final java.util.Map<java.lang.String,java.util.List<java.lang.String>> getParameters()
getParameters
in interface NanoHTTPD.IHTTPSession
public java.lang.String getQueryParameterString()
getQueryParameterString
in interface NanoHTTPD.IHTTPSession
public final java.lang.String getUri()
getUri
in interface NanoHTTPD.IHTTPSession
public long getBodySize()
public void parseBody(java.util.Map<java.lang.String,java.lang.String> files) throws java.io.IOException, NanoHTTPD.ResponseException
NanoHTTPD.IHTTPSession
parseBody
in interface NanoHTTPD.IHTTPSession
files
- map to modifyjava.io.IOException
NanoHTTPD.ResponseException
public java.lang.String getRemoteIpAddress()
NanoHTTPD.IHTTPSession
getRemoteIpAddress
in interface NanoHTTPD.IHTTPSession
public java.lang.String getRemoteHostName()
NanoHTTPD.IHTTPSession
getRemoteHostName
in interface NanoHTTPD.IHTTPSession