Class CacheContent
java.lang.Object
com.adobe.acs.commons.httpcache.engine.CacheContent
Represents response content to be cached.
-
Constructor Summary
ConstructorsConstructorDescriptionNo argument constructor for the build method.CacheContent(int status, String charEncoding, String contentType, Map<String, List<String>> headers, InputStream dataInputStream) ConstructCacheContentusing parameters.CacheContent(int status, String charEncoding, String contentType, Map<String, List<String>> headers, InputStream dataInputStream, HttpCacheServletResponseWrapper.ResponseWriteMethod writeMethod) ConstructCacheContentusing parameters.CacheContent(String charEncoding, String contentType, Map<String, List<String>> headers, InputStream dataInputStream) ConstructCacheContentusing parameters.CacheContent(String charEncoding, String contentType, Map<String, List<String>> headers, InputStream dataInputStream, HttpCacheServletResponseWrapper.ResponseWriteMethod writeMethod) ConstructCacheContentusing parameters. -
Method Summary
Modifier and TypeMethodDescriptionbuild(HttpCacheServletResponseWrapper responseWrapper, int status, String charEncoding, String contentType, Map<String, List<String>> headers) Construct from the custom servlet response wrapper..Get character encoding.Get content type.Get headers.Get input stream of response contentintGet status code.Get the temp size attached to this cache content.
-
Constructor Details
-
CacheContent
public CacheContent(String charEncoding, String contentType, Map<String, List<String>> headers, InputStream dataInputStream) ConstructCacheContentusing parameters. Prefer constructing an instance usingbuildmethod.- Parameters:
charEncoding-contentType-headers-dataInputStream-
-
CacheContent
public CacheContent(String charEncoding, String contentType, Map<String, List<String>> headers, InputStream dataInputStream, HttpCacheServletResponseWrapper.ResponseWriteMethod writeMethod) ConstructCacheContentusing parameters. Prefer constructing an instance usingbuildmethod.- Parameters:
charEncoding-contentType-headers-dataInputStream-writeMethod-
-
CacheContent
public CacheContent(int status, String charEncoding, String contentType, Map<String, List<String>> headers, InputStream dataInputStream) ConstructCacheContentusing parameters. Prefer constructing an instance usingbuildmethod.- Parameters:
status-charEncoding-contentType-headers-dataInputStream-
-
CacheContent
public CacheContent(int status, String charEncoding, String contentType, Map<String, List<String>> headers, InputStream dataInputStream, HttpCacheServletResponseWrapper.ResponseWriteMethod writeMethod) ConstructCacheContentusing parameters. Prefer constructing an instance usingbuildmethod.- Parameters:
status-charEncoding-contentType-headers-dataInputStream-writeMethod-
-
CacheContent
public CacheContent()No argument constructor for the build method.
-
-
Method Details
-
build
public CacheContent build(HttpCacheServletResponseWrapper responseWrapper, int status, String charEncoding, String contentType, Map<String, List<String>> headers) throws HttpCacheDataStreamExceptionConstruct from the custom servlet response wrapper..- Parameters:
responseWrapper-headers-- Returns:
- Throws:
HttpCacheDataStreamException
-
getStatus
public int getStatus()Get status code. -
getCharEncoding
Get character encoding.- Returns:
-
getContentType
Get content type.- Returns:
-
getHeaders
Get headers.- Returns:
- Headers in map of list.
-
getInputDataStream
Get input stream of response content- Returns:
-
getTempSink
Get the temp size attached to this cache content.- Returns:
-
getWriteMethod
-