Package org.apache.wicket.util.resource
Class StringResourceStream
- java.lang.Object
-
- org.apache.wicket.util.resource.AbstractResourceStream
-
- org.apache.wicket.util.resource.AbstractStringResourceStream
-
- org.apache.wicket.util.resource.StringResourceStream
-
- All Implemented Interfaces:
Closeable,Serializable,AutoCloseable,IClusterable,IResourceStream,IStringResourceStream,IModifiable
public final class StringResourceStream extends AbstractStringResourceStream
A StringResourceStream is an IResource implementation for strings.- Author:
- Jonathan Locke
- See Also:
IResourceStream,IModifiable, Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.wicket.util.resource.AbstractStringResourceStream
DEFAULT_CONTENT_TYPE
-
-
Constructor Summary
Constructors Constructor Description StringResourceStream(CharSequence string)Construct.StringResourceStream(CharSequence string, String contentType)Construct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringasString()protected StringgetString()StringtoString()-
Methods inherited from class org.apache.wicket.util.resource.AbstractStringResourceStream
close, getCharset, getContentType, getInputStream, lastModifiedTime, length, setCharset, setLastModified
-
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, wait, wait, wait
-
Methods inherited from interface org.apache.wicket.util.resource.IResourceStream
getLocale, getStyle, getVariation, setLocale, setStyle, setVariation
-
-
-
-
Constructor Detail
-
StringResourceStream
public StringResourceStream(CharSequence string)
Construct.- Parameters:
string- The resource string
-
StringResourceStream
public StringResourceStream(CharSequence string, String contentType)
Construct.- Parameters:
string- The resource stringcontentType- The mime type of this resource, such as "image/jpeg" or "text/html"
-
-
Method Detail
-
toString
public String toString()
- Overrides:
toStringin classObject- See Also:
Object.toString()
-
getString
protected String getString()
- Specified by:
getStringin classAbstractStringResourceStream- Returns:
- The string resource
- See Also:
AbstractStringResourceStream.getString()
-
asString
public String asString()
- Specified by:
asStringin interfaceIStringResourceStream- Overrides:
asStringin classAbstractStringResourceStream- Returns:
- This resource as a String.
-
-