Class CacheContent
- java.lang.Object
-
- com.adobe.acs.commons.httpcache.engine.CacheContent
-
public class CacheContent extends Object
Represents response content to be cached.
-
-
Constructor Summary
Constructors Constructor Description CacheContent()No 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
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description CacheContentbuild(HttpCacheServletResponseWrapper responseWrapper)Deprecated.Use build(HttpCacheServletResponseWrapper responseWrapper,int status, String charEncoding, String contentType, Map<String, List<String> headers) throws HttpCacheDataStreamExceptionCacheContentbuild(HttpCacheServletResponseWrapper responseWrapper, int status, String charEncoding, String contentType, Map<String,List<String>> headers)Construct from the custom servlet response wrapper..StringgetCharEncoding()Get character encoding.StringgetContentType()Get content type.Map<String,List<String>>getHeaders()Get headers.InputStreamgetInputDataStream()Get input stream of response contentintgetStatus()Get status code.TempSinkgetTempSink()Get the temp size attached to this cache content.HttpCacheServletResponseWrapper.ResponseWriteMethodgetWriteMethod()
-
-
-
Constructor Detail
-
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 Detail
-
build
@Deprecated public CacheContent build(HttpCacheServletResponseWrapper responseWrapper) throws HttpCacheDataStreamException
Deprecated.Use build(HttpCacheServletResponseWrapper responseWrapper,int status, String charEncoding, String contentType, Map<String, List<String> headers) throws HttpCacheDataStreamExceptionConstruct from the custom servlet response wrapper..- Parameters:
responseWrapper-- Returns:
- Throws:
HttpCacheDataStreamException
-
build
public CacheContent build(HttpCacheServletResponseWrapper responseWrapper, int status, String charEncoding, String contentType, Map<String,List<String>> headers) throws HttpCacheDataStreamException
Construct from the custom servlet response wrapper..- Parameters:
responseWrapper-headers-- Returns:
- Throws:
HttpCacheDataStreamException
-
getStatus
public int getStatus()
Get status code.
-
getCharEncoding
public String getCharEncoding()
Get character encoding.- Returns:
-
getContentType
public String getContentType()
Get content type.- Returns:
-
getHeaders
public Map<String,List<String>> getHeaders()
Get headers.- Returns:
- Headers in map of list.
-
getInputDataStream
public InputStream getInputDataStream()
Get input stream of response content- Returns:
-
getTempSink
public TempSink getTempSink()
Get the temp size attached to this cache content.- Returns:
-
getWriteMethod
public HttpCacheServletResponseWrapper.ResponseWriteMethod getWriteMethod()
-
-