Class NanoHTTPD.HTTPSession
java.lang.Object
fi.iki.elonen.NanoHTTPD.HTTPSession
- All Implemented Interfaces:
NanoHTTPD.IHTTPSession
- Enclosing class:
NanoHTTPD
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHTTPSession(NanoHTTPD.TempFileManager tempFileManager, InputStream inputStream, OutputStream outputStream) HTTPSession(NanoHTTPD.TempFileManager tempFileManager, InputStream inputStream, OutputStream outputStream, InetAddress inetAddress) -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()longDeduce body length in bytes.final InputStreamfinal NanoHTTPD.MethodgetParms()Deprecated.Get the remote hostname of the requester.Get the remote ip address of the requester.final StringgetUri()voidAdds the files in the request body to the files map.
-
Field Details
-
BUFSIZE
public static final int BUFSIZE- See Also:
-
MAX_HEADER_SIZE
public static final int MAX_HEADER_SIZE- See Also:
-
-
Constructor Details
-
HTTPSession
public HTTPSession(NanoHTTPD.TempFileManager tempFileManager, InputStream inputStream, OutputStream outputStream) -
HTTPSession
public HTTPSession(NanoHTTPD.TempFileManager tempFileManager, InputStream inputStream, OutputStream outputStream, InetAddress inetAddress)
-
-
Method Details
-
execute
- Specified by:
executein interfaceNanoHTTPD.IHTTPSession- Throws:
IOException
-
getCookies
- Specified by:
getCookiesin interfaceNanoHTTPD.IHTTPSession
-
getHeaders
- Specified by:
getHeadersin interfaceNanoHTTPD.IHTTPSession
-
getInputStream
- Specified by:
getInputStreamin interfaceNanoHTTPD.IHTTPSession
-
getMethod
- Specified by:
getMethodin interfaceNanoHTTPD.IHTTPSession
-
getParms
Deprecated.usegetParameters()instead.Description copied from interface:NanoHTTPD.IHTTPSessionThis method will only return the first value for a given parameter. You will want to use getParameters if you expect multiple values for a given key.- Specified by:
getParmsin interfaceNanoHTTPD.IHTTPSession
-
getParameters
- Specified by:
getParametersin interfaceNanoHTTPD.IHTTPSession
-
getQueryParameterString
- Specified by:
getQueryParameterStringin interfaceNanoHTTPD.IHTTPSession
-
getUri
- Specified by:
getUriin interfaceNanoHTTPD.IHTTPSession- Returns:
- the path part of the URL.
-
getBodySize
public long getBodySize()Deduce body length in bytes. Either from "content-length" header or read bytes. -
parseBody
Description copied from interface:NanoHTTPD.IHTTPSessionAdds the files in the request body to the files map.- Specified by:
parseBodyin interfaceNanoHTTPD.IHTTPSession- Parameters:
files- map to modify- Throws:
IOExceptionNanoHTTPD.ResponseException
-
getRemoteIpAddress
Description copied from interface:NanoHTTPD.IHTTPSessionGet the remote ip address of the requester.- Specified by:
getRemoteIpAddressin interfaceNanoHTTPD.IHTTPSession- Returns:
- the IP address.
-
getRemoteHostName
Description copied from interface:NanoHTTPD.IHTTPSessionGet the remote hostname of the requester.- Specified by:
getRemoteHostNamein interfaceNanoHTTPD.IHTTPSession- Returns:
- the hostname.
-
getParameters()instead.