org.apache.wicket.core.util.resource
Class PackageResourceStream
java.lang.Object
org.apache.wicket.util.resource.AbstractResourceStream
org.apache.wicket.core.util.resource.PackageResourceStream
- All Implemented Interfaces:
- Closeable, Serializable, IClusterable, IResourceStream, IModifiable
public class PackageResourceStream
- extends AbstractResourceStream
An IResourceStream that reads data from a resource in the classpath. It simply delegates
all operations to the IResourceStream returned by the application's
IResourceStreamLocator.
- Author:
- Jean-Baptiste Quenot
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PackageResourceStream
public PackageResourceStream(Class<?> scope,
String path)
- Obtains an
IResourceStream from the application's
IResourceStreamLocator.locate(Class, String)
- Parameters:
scope - This argument will be used to get the class loader for loading the package
resource, and to determine what package it is in.path - The path to the resource
close
public void close()
throws IOException
- Throws:
IOException
getContentType
public String getContentType()
- Specified by:
getContentType in interface IResourceStream- Overrides:
getContentType in class AbstractResourceStream
getInputStream
public InputStream getInputStream()
throws ResourceStreamNotFoundException
- Throws:
ResourceStreamNotFoundException
length
public Bytes length()
- Specified by:
length in interface IResourceStream- Overrides:
length in class AbstractResourceStream
lastModifiedTime
public Time lastModifiedTime()
- Specified by:
lastModifiedTime in interface IModifiable- Overrides:
lastModifiedTime in class AbstractResourceStream
Copyright © 2006–2014 Apache Software Foundation. All rights reserved.