public class RestResponse
extends ch.software_atelier.simpleflex.docs.WebDoc
| Constructor and Description |
|---|
RestResponse(String name,
String mime,
byte[] content) |
RestResponse(String name,
String mime,
File file,
boolean isTemporary) |
RestResponse(String name,
String mime,
InputStream content,
long size) |
| Modifier and Type | Method and Description |
|---|---|
void |
addHeader(String name,
String value) |
static RestResponse |
badRequest_400(Object msg) |
byte[] |
byteData() |
void |
close() |
String |
dataType() |
static RestResponse |
error(int errCode,
String errMsg,
Object msg) |
static RestResponse |
internalServerError_500(Object msg) |
static RestResponse |
json_200(org.json.JSONArray obj) |
static RestResponse |
json_200(org.json.JSONObject obj) |
static RestResponse |
json_201_created(org.json.JSONArray obj) |
static RestResponse |
json_201_created(org.json.JSONObject obj) |
static RestResponse |
methodNotAllewed_405() |
String |
mime() |
String |
name() |
static RestResponse |
noContent_204() |
static RestResponse |
notFound_404() |
long |
size() |
InputStream |
streamData() |
static RestResponse |
unauthorized_401() |
public RestResponse(String name, String mime, InputStream content, long size)
public RestResponse(String name, String mime, File file, boolean isTemporary) throws FileNotFoundException
FileNotFoundExceptionpublic static RestResponse json_200(org.json.JSONObject obj)
public static RestResponse json_200(org.json.JSONArray obj)
public static RestResponse json_201_created(org.json.JSONObject obj)
public static RestResponse json_201_created(org.json.JSONArray obj)
public static RestResponse notFound_404()
public static RestResponse methodNotAllewed_405()
public static RestResponse badRequest_400(Object msg)
public static RestResponse unauthorized_401()
public static RestResponse noContent_204()
public static RestResponse internalServerError_500(Object msg)
public static RestResponse error(int errCode, String errMsg, Object msg)
public long size()
size in class ch.software_atelier.simpleflex.docs.WebDocpublic String mime()
mime in class ch.software_atelier.simpleflex.docs.WebDocpublic String name()
name in class ch.software_atelier.simpleflex.docs.WebDocpublic byte[] byteData()
byteData in class ch.software_atelier.simpleflex.docs.WebDocpublic InputStream streamData()
streamData in class ch.software_atelier.simpleflex.docs.WebDocpublic String dataType()
dataType in class ch.software_atelier.simpleflex.docs.WebDocpublic void close()
close in class ch.software_atelier.simpleflex.docs.WebDocCopyright © 2020 Software Atelier Kamber. All rights reserved.