Class RestResponse
java.lang.Object
ch.software_atelier.simpleflex.docs.WebDoc
ch.software_atelier.simpleflex.rest.RestResponse
public class RestResponse
extends ch.software_atelier.simpleflex.docs.WebDoc
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.software_atelier.simpleflex.docs.WebDoc
ch.software_atelier.simpleflex.docs.WebDoc.HTTPCode -
Field Summary
Fields inherited from class ch.software_atelier.simpleflex.docs.WebDoc
DATA_BYTE, DATA_STREAM -
Constructor Summary
ConstructorsConstructorDescriptionRestResponse(String name, String mime, byte[] content) RestResponse(String name, String mime, File file, boolean isTemporary) RestResponse(String name, String mime, InputStream content, long size) -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic RestResponsebadRequest_400(Object msg) byte[]byteData()voidclose()dataType()static RestResponsestatic RestResponsestatic RestResponsejson_200(org.json.JSONArray obj) static RestResponsejson_200(org.json.JSONObject obj) static RestResponsejson_201_created(org.json.JSONArray obj) static RestResponsejson_201_created(org.json.JSONObject obj) static RestResponsemime()name()static RestResponsestatic RestResponselongsize()static RestResponseMethods inherited from class ch.software_atelier.simpleflex.docs.WebDoc
getHeaders, getHttpCode, setHTTPCode
-
Constructor Details
-
RestResponse
-
RestResponse
-
RestResponse
public RestResponse(String name, String mime, File file, boolean isTemporary) throws FileNotFoundException - Throws:
FileNotFoundException
-
-
Method Details
-
json_200
-
json_200
-
json_201_created
-
json_201_created
-
notFound_404
-
methodNotAllewed_405
-
badRequest_400
-
unauthorized_401
-
noContent_204
-
internalServerError_500
-
error
-
addHeader
-
size
public long size()- Specified by:
sizein classch.software_atelier.simpleflex.docs.WebDoc
-
mime
- Specified by:
mimein classch.software_atelier.simpleflex.docs.WebDoc
-
name
- Specified by:
namein classch.software_atelier.simpleflex.docs.WebDoc
-
byteData
public byte[] byteData()- Specified by:
byteDatain classch.software_atelier.simpleflex.docs.WebDoc
-
streamData
- Specified by:
streamDatain classch.software_atelier.simpleflex.docs.WebDoc
-
dataType
- Specified by:
dataTypein classch.software_atelier.simpleflex.docs.WebDoc
-
close
public void close()- Specified by:
closein classch.software_atelier.simpleflex.docs.WebDoc
-