public class ResourceStreamResource extends AbstractResource
resource that loads its data from IResourceStreamAbstractResource.ContentRangeType, AbstractResource.ResourceResponse, AbstractResource.WriteCallbackIResource.AttributesCONTENT_DISPOSITION_HEADER_NAME, CONTENT_RANGE_ENDBYTE, CONTENT_RANGE_STARTBYTE, INTERNAL_HEADERS| Constructor and Description |
|---|
ResourceStreamResource()
Constructor.
|
ResourceStreamResource(org.apache.wicket.util.resource.IResourceStream stream)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.wicket.util.time.Duration |
getCacheDuration() |
protected org.apache.wicket.util.resource.IResourceStream |
getResourceStream(IResource.Attributes attributes)
Lazy or dynamic initialization of the wrapped IResourceStream(Writer)
|
protected AbstractResource.ResourceResponse |
newResourceResponse(IResource.Attributes attributes)
Override this method to return a
AbstractResource.ResourceResponse for the request. |
ResourceStreamResource |
setCacheDuration(org.apache.wicket.util.time.Duration cacheDuration) |
ResourceStreamResource |
setContentDisposition(ContentDisposition contentDisposition) |
ResourceStreamResource |
setFileName(String fileName) |
ResourceStreamResource |
setTextEncoding(String textEncoding) |
configureCache, getCachingStrategy, respond, setRequestMetaData, setRequestRangeMetaData, setResponseContentRangeHeaderFields, setResponseHeaderspublic ResourceStreamResource()
public ResourceStreamResource(org.apache.wicket.util.resource.IResourceStream stream)
stream - the resource stream to read frompublic ResourceStreamResource setFileName(String fileName)
fileName - public ResourceStreamResource setContentDisposition(ContentDisposition contentDisposition)
contentDisposition - public ResourceStreamResource setTextEncoding(String textEncoding)
textEncoding - public org.apache.wicket.util.time.Duration getCacheDuration()
public ResourceStreamResource setCacheDuration(org.apache.wicket.util.time.Duration cacheDuration)
cacheDuration - the duration for which the resource will be cached by the browserprotected org.apache.wicket.util.resource.IResourceStream getResourceStream(IResource.Attributes attributes)
attributes - The request attributesnull.protected AbstractResource.ResourceResponse newResourceResponse(IResource.Attributes attributes)
AbstractResourceAbstractResource.ResourceResponse for the request.newResourceResponse in class AbstractResourceattributes - request attributesCopyright © 2006–2018 Apache Software Foundation. All rights reserved.