public static class NanoHTTPD.Response
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
NanoHTTPD.Response.Status
Some HTTP response status codes
|
Constructor and Description |
---|
Response(NanoHTTPD.Response.Status status,
java.lang.String mimeType,
java.io.InputStream data)
Basic constructor.
|
Response(NanoHTTPD.Response.Status status,
java.lang.String mimeType,
java.lang.String txt)
Convenience method that makes an InputStream out of given text.
|
Response(java.lang.String msg)
Default constructor: response = HTTP_OK, mime = MIME_HTML and your
supplied message
|
Modifier and Type | Method and Description |
---|---|
void |
addHeader(java.lang.String name,
java.lang.String value)
Adds given line to the header.
|
java.io.InputStream |
getData() |
java.lang.String |
getMimeType() |
NanoHTTPD.Method |
getRequestMethod() |
NanoHTTPD.Response.Status |
getStatus() |
void |
setChunkedTransfer(boolean chunkedTransfer) |
void |
setData(java.io.InputStream data) |
void |
setMimeType(java.lang.String mimeType) |
void |
setRequestMethod(NanoHTTPD.Method requestMethod) |
void |
setStatus(NanoHTTPD.Response.Status status) |
public Response(java.lang.String msg)
msg
- public Response(NanoHTTPD.Response.Status status, java.lang.String mimeType, java.io.InputStream data)
status
- mimeType
- data
- public Response(NanoHTTPD.Response.Status status, java.lang.String mimeType, java.lang.String txt)
status
- mimeType
- txt
- public void addHeader(java.lang.String name, java.lang.String value)
name
- value
- public NanoHTTPD.Response.Status getStatus()
public void setStatus(NanoHTTPD.Response.Status status)
public java.lang.String getMimeType()
public void setMimeType(java.lang.String mimeType)
public java.io.InputStream getData()
public void setData(java.io.InputStream data)
public NanoHTTPD.Method getRequestMethod()
public void setRequestMethod(NanoHTTPD.Method requestMethod)
public void setChunkedTransfer(boolean chunkedTransfer)