org.apache.wicket.request.resource
Class ResourceStreamResource

java.lang.Object
  extended by org.apache.wicket.request.resource.AbstractResource
      extended by org.apache.wicket.request.resource.ResourceStreamResource
All Implemented Interfaces:
Serializable, IResource, IClusterable

public class ResourceStreamResource
extends AbstractResource

TODO javadoc

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.wicket.request.resource.AbstractResource
AbstractResource.ResourceResponse, AbstractResource.WriteCallback
 
Nested classes/interfaces inherited from interface org.apache.wicket.request.resource.IResource
IResource.Attributes
 
Field Summary
 
Fields inherited from class org.apache.wicket.request.resource.AbstractResource
INTERNAL_HEADERS
 
Constructor Summary
ResourceStreamResource()
          Constructor.
ResourceStreamResource(IResourceStream stream)
          Constructor.
 
Method Summary
 Duration getCacheDuration()
           
protected  IResourceStream getResourceStream()
          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(Duration cacheDuration)
           
 ResourceStreamResource setContentDisposition(ContentDisposition contentDisposition)
           
 ResourceStreamResource setFileName(String fileName)
           
 ResourceStreamResource setTextEncoding(String textEncoding)
           
 
Methods inherited from class org.apache.wicket.request.resource.AbstractResource
configureCache, flushResponseAfterHeaders, getCachingStrategy, respond, setResponseHeaders
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceStreamResource

public ResourceStreamResource()
Constructor.


ResourceStreamResource

public ResourceStreamResource(IResourceStream stream)
Constructor.

Parameters:
stream - the resource stream to read from
Method Detail

setFileName

public ResourceStreamResource setFileName(String fileName)
Parameters:
fileName -
Returns:
this object, for chaining

setContentDisposition

public ResourceStreamResource setContentDisposition(ContentDisposition contentDisposition)
Parameters:
contentDisposition -
Returns:
this object, for chaining

setTextEncoding

public ResourceStreamResource setTextEncoding(String textEncoding)
Parameters:
textEncoding -
Returns:
this object, for chaining

getCacheDuration

public Duration getCacheDuration()
Returns:
the duration for which the resource will be cached by the browser

setCacheDuration

public ResourceStreamResource setCacheDuration(Duration cacheDuration)
Parameters:
cacheDuration - the duration for which the resource will be cached by the browser
Returns:
this object, for chaining

getResourceStream

protected IResourceStream getResourceStream()
Lazy or dynamic initialization of the wrapped IResourceStream(Writer)

Returns:
the underlying IResourceStream. May be null.

newResourceResponse

protected AbstractResource.ResourceResponse newResourceResponse(IResource.Attributes attributes)
Description copied from class: AbstractResource
Override this method to return a AbstractResource.ResourceResponse for the request.

Specified by:
newResourceResponse in class AbstractResource
Parameters:
attributes - request attributes
Returns:
resource data instance


Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.