|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IResourceStream
Interface to a streamed resource. The resource stream can be retrieved by calling getInputStream(), but the resource should later be closed by calling close() on the IResourceStream (as opposed to calling close on the InputStream returned by getInputStream()).
Once a resource has been closed with a call to close(), it is normally possible to call getInputStream() again to retrieve a new input stream on the same resource.
Implementations of this interface are typically unsafe for use from multiple threads.
Method Summary | |
---|---|
void |
close()
Closes the resource. |
String |
getContentType()
Gets the mime type of this resource |
InputStream |
getInputStream()
Gets the resource stream. |
Locale |
getLocale()
|
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 |
void |
setLocale(Locale locale)
This method shouldn't be used for the outside, It is used by the Loaders to set the resolved locale. |
Methods inherited from interface org.apache.wicket.util.watch.IModifiable |
---|
lastModifiedTime |
Method Detail |
---|
String getContentType()
ResourceStreamRequestTarget
handle the Content-Type automaticallyResponse.detectContentType(org.apache.wicket.RequestCycle, String)
long length()
InputStream getInputStream() throws ResourceStreamNotFoundException
ResourceStreamNotFoundException
close()
void close() throws IOException
close
in interface Closeable
IOException
Locale getLocale()
void setLocale(Locale locale)
locale
- The Locale where this stream did resolve to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |