|
||||||||||
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.AbstractStringResourceStream
public abstract class AbstractStringResourceStream
Base class for string resources.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_CONTENT_TYPE
The content-type applied in case the resource stream's default constructor is used |
Constructor Summary | |
---|---|
AbstractStringResourceStream()
Constructor. |
|
AbstractStringResourceStream(java.lang.String contentType)
Constructor. |
Method Summary | |
---|---|
java.lang.String |
asString()
|
void |
close()
Closes the resource. |
protected java.nio.charset.Charset |
getCharset()
|
java.lang.String |
getContentType()
Gets the mime type of this resource |
java.io.InputStream |
getInputStream()
Gets the resource stream. |
protected abstract java.lang.String |
getString()
|
Time |
lastModifiedTime()
Gets the last time this modifiable thing changed. |
Bytes |
length()
Gets the size of this resource |
void |
setCharset(java.nio.charset.Charset charset)
Sets the character set used for reading this resource. |
void |
setLastModified(Time lastModified)
|
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 |
Methods inherited from interface org.apache.wicket.util.resource.IResourceStream |
---|
getLocale, getStyle, getVariation, setLocale, setStyle, setVariation |
Field Detail |
---|
public static final java.lang.String DEFAULT_CONTENT_TYPE
Constructor Detail |
---|
public AbstractStringResourceStream()
public AbstractStringResourceStream(java.lang.String contentType)
contentType
- The mime type of this resource, such as "image/jpeg" or "text/html"Method Detail |
---|
public java.lang.String asString()
asString
in interface IStringResourceStream
protected java.nio.charset.Charset getCharset()
public void setCharset(java.nio.charset.Charset charset)
setCharset
in interface IStringResourceStream
charset
- Charset for componentpublic void close() throws java.io.IOException
IResourceStream
close
in interface java.io.Closeable
close
in interface IResourceStream
java.io.IOException
IResourceStream.close()
public java.lang.String getContentType()
IResourceStream
getContentType
in interface IResourceStream
getContentType
in class AbstractResourceStream
ResourceStreamRequestHandler
handle the Content-Type automaticallyIResourceStream.getContentType()
public java.io.InputStream getInputStream() throws ResourceStreamNotFoundException
IResourceStream
getInputStream
in interface IResourceStream
ResourceStreamNotFoundException
IResourceStream.getInputStream()
public Time lastModifiedTime()
IModifiable
lastModifiedTime
in interface IModifiable
lastModifiedTime
in class AbstractResourceStream
Time
or
null
if that information is not availableIModifiable.lastModifiedTime()
public void setLastModified(Time lastModified)
lastModified
- The lastModified to set.protected abstract java.lang.String getString()
public final Bytes length()
IResourceStream
length
in interface IResourceStream
length
in class AbstractResourceStream
null
if unknown
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |