org.apache.wicket.util.resource
Class StringResourceStream

java.lang.Object
  extended by org.apache.wicket.util.resource.AbstractResourceStream
      extended by org.apache.wicket.util.resource.AbstractStringResourceStream
          extended by org.apache.wicket.util.resource.StringResourceStream
All Implemented Interfaces:
Closeable, Serializable, IClusterable, IResourceStream, IStringResourceStream, IModifiable

public 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
StringResourceStream(CharSequence string)
          Construct.
StringResourceStream(CharSequence string, String contentType)
          Construct.
 
Method Summary
 String asString()
           
protected  String getString()
           
 String toString()
           
 
Methods inherited from class org.apache.wicket.util.resource.AbstractStringResourceStream
close, getContentType, getInputStream, lastModifiedTime, length, setLastModified
 
Methods inherited from class org.apache.wicket.util.resource.AbstractResourceStream
getCharset, getLocale, setCharset, setLocale
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 string
contentType - The mime type of this resource, such as "image/jpeg" or "text/html"
Method Detail

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

getString

protected String getString()
Specified by:
getString in class AbstractStringResourceStream
Returns:
The string resource
See Also:
AbstractStringResourceStream.getString()

asString

public String asString()
Specified by:
asString in interface IStringResourceStream
Overrides:
asString in class AbstractResourceStream
Returns:
This resource as a String.
See Also:
AbstractResourceStream.asString()


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.