Package org.restheart.exchange
Class ByteArrayProxyRequest
- java.lang.Object
-
- org.restheart.exchange.Exchange<T>
-
- org.restheart.exchange.Request<T>
-
- org.restheart.exchange.ProxyRequest<byte[]>
-
- org.restheart.exchange.ByteArrayProxyRequest
-
- All Implemented Interfaces:
BufferedExchange<byte[]>
public class ByteArrayProxyRequest extends ProxyRequest<byte[]>
- Author:
- Andrea Di Cesare <andrea@softinstigate.com>
-
-
Field Summary
-
Fields inherited from class org.restheart.exchange.Request
FORM_URLENCODED, MULTIPART, PATCH, SLASH, UNDERSCORE
-
Fields inherited from class org.restheart.exchange.Exchange
APP_FORM_URLENCODED_TYPE, APPLICATION_PDF_TYPE, HAL_JSON_MEDIA_TYPE, IN_ERROR_KEY, JSON_MEDIA_TYPE, LOGGER, MAX_BUFFERS, MAX_CONTENT_SIZE, MULTIPART_FORM_DATA_TYPE, wrapped
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedByteArrayProxyRequest(io.undertow.server.HttpServerExchange exchange)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ByteArrayProxyRequestof(io.undertow.server.HttpServerExchange exchange)byte[]readContent()reads data from the buffer converting it to Tstatic Typetype()voidwriteContent(byte[] content)writes data the buffer from T-
Methods inherited from class org.restheart.exchange.ProxyRequest
getBuffer, getRawContentKey, isContentAvailable, setBuffer
-
Methods inherited from class org.restheart.exchange.Request
addXForwardedHeader, getAuthenticatedAccount, getContentType, getContentType, getMethod, getPath, getPipelineInfo, getStartTime, getXForwardedHeaders, isContentTypeFormOrMultipart, isContentTypeFormOrMultipart, isContentTypeJson, isDelete, isGet, isOptions, isPatch, isPost, isPut, setContentLength, setContentType, setContentTypeAsJson, setPipelineInfo, setStartTime
-
Methods inherited from class org.restheart.exchange.Exchange
getExchange, getWrappedExchange, isAccountInRole, isAuthenticated, isAuthenticated, isContentTypeJson, isContentTypeText, isContentTypeXml, isInError, isInError, responseInterceptorsExecuted, setInError, setInError, setResponseInterceptorsExecuted, updateBufferSize
-
-
-
-
Method Detail
-
of
public static ByteArrayProxyRequest of(io.undertow.server.HttpServerExchange exchange)
-
type
public static Type type()
-
readContent
public byte[] readContent() throws IOExceptionDescription copied from interface:BufferedExchangereads data from the buffer converting it to T- Specified by:
readContentin interfaceBufferedExchange<byte[]>- Specified by:
readContentin classProxyRequest<byte[]>- Returns:
- the content as Json
- Throws:
IOException
-
writeContent
public void writeContent(byte[] content) throws IOExceptionDescription copied from interface:BufferedExchangewrites data the buffer from T- Specified by:
writeContentin interfaceBufferedExchange<byte[]>- Specified by:
writeContentin classProxyRequest<byte[]>- Throws:
IOException
-
-