|
||||||||||
| 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.AbstractStringResourceStream
public abstract class AbstractStringResourceStream
Base class for string resources.
| Field Summary | |
|---|---|
static String |
DEFAULT_CONTENT_TYPE
The content-type applied in case the resource stream's default constructor is used |
| Constructor Summary | |
|---|---|
AbstractStringResourceStream()
Constructor. |
|
AbstractStringResourceStream(String contentType)
Constructor. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the resource. |
String |
getContentType()
Gets the mime type of this resource |
InputStream |
getInputStream()
Gets the resource stream. |
protected abstract String |
getString()
|
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 |
void |
setLastModified(Time lastModified)
|
| Methods inherited from class org.apache.wicket.util.resource.AbstractResourceStream |
|---|
asString, getCharset, getLocale, getStyle, getVariation, setCharset, setLocale, setStyle, setVariation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_CONTENT_TYPE
| Constructor Detail |
|---|
public AbstractStringResourceStream()
public AbstractStringResourceStream(String contentType)
contentType - The mime type of this resource, such as "image/jpeg" or "text/html"| Method Detail |
|---|
public void close()
throws IOException
IResourceStream
IOExceptionIResourceStream.close()public String getContentType()
IResourceStream
getContentType in interface IResourceStreamgetContentType in class AbstractResourceStreamResourceStreamRequestHandler handle the Content-Type automaticallyIResourceStream.getContentType()
public InputStream getInputStream()
throws ResourceStreamNotFoundException
IResourceStream
ResourceStreamNotFoundExceptionIResourceStream.getInputStream()public Time lastModifiedTime()
IModifiable
lastModifiedTime in interface IModifiablelastModifiedTime in class AbstractResourceStreamTimeIModifiable.lastModifiedTime()public void setLastModified(Time lastModified)
lastModified - The lastModified to set.protected abstract String getString()
public final long length()
IResourceStream
length in interface IResourceStreamlength in class AbstractResourceStreamIResourceStream.length()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||