|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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. |
long |
length()
Gets the size of this resource in bytes TODO 1.5: rename to lengthInBytes() or let it return some sort of size object |
| Methods inherited from class org.apache.wicket.util.resource.AbstractResourceStream |
|---|
asString, getCharset, getLocale, setCharset, setLocale |
| 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 resource| Method Detail |
|---|
public void close()
throws java.io.IOException
IResourceStream
java.io.IOExceptionpublic java.lang.String getContentType()
IResourceStream
getContentType in interface IResourceStreamgetContentType in class AbstractResourceStreamResourceStreamRequestTarget handle the Content-Type automaticallyIResourceStream.getContentType()
public java.io.InputStream getInputStream()
throws ResourceStreamNotFoundException
IResourceStream
ResourceStreamNotFoundExceptionIResourceStream.close()public long length()
IResourceStream
length in interface IResourceStreamlength in class AbstractResourceStreamIResourceStream.length()public Time lastModifiedTime()
IModifiable
lastModifiedTime in interface IModifiablelastModifiedTime in class AbstractResourceStreamTimeIModifiable.lastModifiedTime()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||