|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.util.resource.AbstractResourceStream org.apache.wicket.util.resource.PackageResourceStream
public class PackageResourceStream
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
.
Constructor Summary | |
---|---|
PackageResourceStream(java.lang.Class<?> scope,
java.lang.String path)
Obtains an IResourceStream from the application's
IResourceStreamLocator.locate(Class, String) |
Method Summary | |
---|---|
void |
close()
Closes the resource. |
java.lang.String |
getContentType()
Gets the mime type of this resource |
java.io.InputStream |
getInputStream()
Gets the resource stream. |
Time |
lastModifiedTime()
Gets the last time this modifiable thing changed. |
Bytes |
length()
Gets the size of this resource |
Methods inherited from class org.apache.wicket.util.resource.AbstractResourceStream |
---|
getLocale, getStyle, getVariation, setLocale, setStyle, setVariation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PackageResourceStream(java.lang.Class<?> scope, java.lang.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 resourceMethod Detail |
---|
public void close() throws java.io.IOException
IResourceStream
java.io.IOException
public java.lang.String getContentType()
IResourceStream
getContentType
in interface IResourceStream
getContentType
in class AbstractResourceStream
ResourceStreamRequestHandler
handle the Content-Type automaticallyWebResponse#detectContentType(org.apache.wicket.RequestCycle, String)
public java.io.InputStream getInputStream() throws ResourceStreamNotFoundException
IResourceStream
ResourceStreamNotFoundException
IResourceStream.close()
public Bytes length()
IResourceStream
length
in interface IResourceStream
length
in class AbstractResourceStream
null
if unknownpublic Time lastModifiedTime()
IModifiable
lastModifiedTime
in interface IModifiable
lastModifiedTime
in class AbstractResourceStream
Time
or
null
if that information is not available
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |