public class PackageResourceStream
extends org.apache.wicket.util.resource.AbstractResourceStream
IResourceStream that reads data from a resource in the classpath. It simply delegates
all operations to the IResourceStream returned by the application's
IResourceStreamLocator.| Constructor and Description |
|---|
PackageResourceStream(Class<?> scope,
String path)
Obtains an
IResourceStream from the application's
IResourceStreamLocator.locate(Class, String) |
PackageResourceStream(Class<?> scope,
String path,
Locale locale,
String style,
String variation)
Obtains an
IResourceStream from the application's
IResourceStreamLocator.locate(Class, String) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
String |
getContentType() |
InputStream |
getInputStream() |
org.apache.wicket.util.time.Time |
lastModifiedTime() |
org.apache.wicket.util.lang.Bytes |
length() |
public PackageResourceStream(Class<?> scope, String path)
IResourceStream from the application's
IResourceStreamLocator.locate(Class, String)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 resourcepublic PackageResourceStream(Class<?> scope, String path, Locale locale, String style, String variation)
IResourceStream from the application's
IResourceStreamLocator.locate(Class, String)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 resourcelocale - the locale of the resource to getstyle - the style of the resource to getvariation - the variation of the resource to getpublic void close()
throws IOException
IOExceptionpublic String getContentType()
getContentType in interface org.apache.wicket.util.resource.IResourceStreamgetContentType in class org.apache.wicket.util.resource.AbstractResourceStreampublic InputStream getInputStream() throws org.apache.wicket.util.resource.ResourceStreamNotFoundException
org.apache.wicket.util.resource.ResourceStreamNotFoundExceptionpublic org.apache.wicket.util.lang.Bytes length()
length in interface org.apache.wicket.util.resource.IResourceStreamlength in class org.apache.wicket.util.resource.AbstractResourceStreampublic org.apache.wicket.util.time.Time lastModifiedTime()
lastModifiedTime in interface org.apache.wicket.util.watch.IModifiablelastModifiedTime in class org.apache.wicket.util.resource.AbstractResourceStreamCopyright © 2006–2018 Apache Software Foundation. All rights reserved.