public class ResponseUtils
extends java.lang.Object
Constructor and Description |
---|
ResponseUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
respondWithFile(java.lang.String contentType,
java.io.File file,
ResponseFacade resp) |
static void |
respondWithImage(ResponseFacade resp,
java.awt.image.BufferedImage img) |
static void |
respondWithJSON(ResponseFacade resp,
JSONArray json,
int statusCode) |
static void |
respondWithJSON(ResponseFacade resp,
JSONObject json,
int statusCode) |
static void |
respondWithJSONAsText(ResponseFacade resp,
JSONObject json,
int statusCode) |
static void |
respondWithNegotiatedServerResource(java.lang.String contentType,
java.lang.String path,
ResponseFacade resp)
Negotiate resource based on server configuration.
|
static void |
respondWithPDF(ResponseFacade resp,
java.io.File f) |
static void |
respondWithServerResource(java.lang.String contentType,
java.lang.String path,
ResponseFacade resp,
java.lang.Boolean compress) |
static void |
respondWithStatus(int status,
java.lang.String text,
ResponseFacade resp,
boolean error) |
static void |
respondWithStatus(int status,
java.lang.String text,
java.lang.String contentType,
ResponseFacade resp,
boolean error) |
static void |
respondWithXML(ResponseFacade resp,
org.w3c.dom.Document xmlDoc,
int statusCode) |
public static void respondWithStatus(int status, java.lang.String text, java.lang.String contentType, ResponseFacade resp, boolean error) throws java.io.IOException
java.io.IOException
public static void respondWithStatus(int status, java.lang.String text, ResponseFacade resp, boolean error) throws java.io.IOException
java.io.IOException
public static void respondWithServerResource(java.lang.String contentType, java.lang.String path, ResponseFacade resp, java.lang.Boolean compress) throws java.io.IOException
java.io.IOException
public static void respondWithNegotiatedServerResource(java.lang.String contentType, java.lang.String path, ResponseFacade resp) throws java.io.IOException
contentType
- path
- resp
- java.io.IOException
public static void respondWithImage(ResponseFacade resp, java.awt.image.BufferedImage img) throws java.io.IOException
java.io.IOException
public static void respondWithXML(ResponseFacade resp, org.w3c.dom.Document xmlDoc, int statusCode) throws java.io.IOException
java.io.IOException
public static void respondWithJSON(ResponseFacade resp, JSONObject json, int statusCode) throws java.io.IOException
java.io.IOException
public static void respondWithJSONAsText(ResponseFacade resp, JSONObject json, int statusCode) throws java.io.IOException
java.io.IOException
public static void respondWithJSON(ResponseFacade resp, JSONArray json, int statusCode) throws java.io.IOException
java.io.IOException
public static void respondWithPDF(ResponseFacade resp, java.io.File f) throws java.io.IOException
java.io.IOException
public static void respondWithFile(java.lang.String contentType, java.io.File file, ResponseFacade resp) throws java.io.IOException
java.io.IOException