org.apache.wicket.resource
Class ContextRelativeResource

java.lang.Object
  extended by org.apache.wicket.Resource
      extended by org.apache.wicket.markup.html.WebResource
          extended by org.apache.wicket.resource.ContextRelativeResource
All Implemented Interfaces:
Serializable, IClusterable, IRequestListener, IResourceListener

public class ContextRelativeResource
extends WebResource

Resource served from a file relative to the context root.

Author:
almaw
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.apache.wicket.IResourceListener
INTERFACE
 
Constructor Summary
ContextRelativeResource(String pathRelativeToContextRoot)
          Construct.
 
Method Summary
 IResourceStream getResourceStream()
          Returns a new IResourceStream that provides all data for the request.
 
Methods inherited from class org.apache.wicket.markup.html.WebResource
configureResponse, getCacheDuration, setHeaders
 
Methods inherited from class org.apache.wicket.Resource
getParameters, invalidate, isCacheable, onResourceRequested, setCacheable, setParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextRelativeResource

public ContextRelativeResource(String pathRelativeToContextRoot)
Construct.

Parameters:
pathRelativeToContextRoot -
Method Detail

getResourceStream

public IResourceStream getResourceStream()
Description copied from class: Resource
Returns a new IResourceStream that provides all data for the request. Despite its name, this method should return a new IResourceStream instance each time it is invoked (otherwise the InputStream returned from the IResourceStream would be at EOF when a second request is handled for the same Resource). The caller must invoke IResourceStream.close() when finished.

Specified by:
getResourceStream in class Resource
Returns:
a new IResourceStream instance for this Resource.
See Also:
Resource.getResourceStream()


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.