public class HttpResponses
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
GET_METHOD |
static java.lang.String |
MIME_TYPE_JSON |
static java.lang.String |
MIME_TYPE_TEXT_PLAIN |
static java.lang.String |
POST_METHOD |
| Constructor and Description |
|---|
HttpResponses() |
| Modifier and Type | Method and Description |
|---|---|
static void |
newFixedLengthResponse(com.sun.net.httpserver.HttpExchange httpExchange,
int responseCode,
java.lang.String mimeType,
java.lang.String response) |
static void |
newResponseCodeOnlyResponse(com.sun.net.httpserver.HttpExchange httpExchange,
int responseCode) |
public static final java.lang.String MIME_TYPE_TEXT_PLAIN
public static final java.lang.String MIME_TYPE_JSON
public static final java.lang.String GET_METHOD
public static final java.lang.String POST_METHOD
public static void newResponseCodeOnlyResponse(com.sun.net.httpserver.HttpExchange httpExchange,
int responseCode)
throws java.io.IOException
java.io.IOExceptionpublic static void newFixedLengthResponse(com.sun.net.httpserver.HttpExchange httpExchange,
int responseCode,
java.lang.String mimeType,
java.lang.String response)
throws java.io.IOException
java.io.IOException