Package org.restheart.exchange
Class ByteArrayResponse
java.lang.Object
org.restheart.exchange.Exchange<byte[]>
org.restheart.exchange.Response<byte[]>
org.restheart.exchange.ServiceResponse<byte[]>
org.restheart.exchange.ByteArrayResponse
- Author:
- Andrea Di Cesare <andrea@softinstigate.com>
-
Field Summary
Fields inherited from class org.restheart.exchange.ServiceResponse
contentFields inherited from class org.restheart.exchange.Exchange
APPLICATION_PDF_TYPE, FORM_URLENCODED, HAL_JSON_MEDIA_TYPE, IN_ERROR_KEY, JSON_MEDIA_TYPE, MAX_BUFFERS, MAX_CONTENT_SIZE, MULTIPART, TEXT_PLAIN_CONTENT_TYPE, wrapped -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedByteArrayResponse(io.undertow.server.HttpServerExchange exchange) -
Method Summary
Modifier and TypeMethodDescriptionstatic ByteArrayResponseinit(io.undertow.server.HttpServerExchange exchange) static ByteArrayResponseof(io.undertow.server.HttpServerExchange exchange) Reads the content as a String.voidsetContent(String content) voidsetInError(int code, String message, Throwable t) Methods inherited from class org.restheart.exchange.ServiceResponse
getContent, getCustomSender, of, setContent, setCustomSenderMethods inherited from class org.restheart.exchange.Response
getContentType, getContentType, getHeader, getHeader, getHeaders, getMDCContext, getStatusCode, setContentType, setContentTypeAsJson, setHeader, setHeader, setInError, setMDCContext, setStatusCodeMethods inherited from class org.restheart.exchange.Exchange
getExchange, getWrappedExchange, isAccountInRole, isAuthenticated, isAuthenticated, isContentTypeFormOrMultipart, isContentTypeFormOrMultipart, isContentTypeJson, isContentTypeJson, isContentTypeText, isContentTypeXml, isInError, isInError, responseInterceptorsExecuted, setInError, setInError, setResponseInterceptorsExecuted, updateBufferSize
-
Constructor Details
-
ByteArrayResponse
protected ByteArrayResponse(io.undertow.server.HttpServerExchange exchange)
-
-
Method Details
-
init
-
of
-
readContent
Description copied from class:ServiceResponseReads the content as a String. This method is used by ResponseSender to generate the response content to send to the client.- Specified by:
readContentin classServiceResponse<byte[]>- Returns:
- the content as string
-
setInError
- Specified by:
setInErrorin classServiceResponse<byte[]>- Parameters:
code-message-t-
-
setContent
-