org.wings.resource
Class StringResource

java.lang.Object
  extended by org.wings.Resource
      extended by org.wings.resource.StringResource
All Implemented Interfaces:
Serializable, Renderable, URLResource

public class StringResource
extends Resource

For externalizing a string as a resource.

Author:
Holger Engels
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.wings.Resource
Resource.HeaderEntry
 
Field Summary
protected  int externalizerFlags
          Flags that influence the behaviour of the externalize manager
 
Fields inherited from class org.wings.Resource
extension, headers, mimeType
 
Constructor Summary
StringResource(String string)
          Default c'tor externalizing this resource as text/plain MIME document.
StringResource(String string, String extension, String mimeType)
           
StringResource(String string, String extension, String mimeType, int externalizerFlags)
           
 
Method Summary
 int getExternalizerFlags()
           
 String getId()
          Get the id that identifies this resource as an externalized object.
 int getLength()
           
 SimpleURL getURL()
          returns the URL, this resource can be fetched from.
 void write(Device out)
          Write this Renderable component to some output device.
 
Methods inherited from class org.wings.Resource
getExtension, getHeaders, getMimeType, getSession, setHeaders, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

externalizerFlags

protected int externalizerFlags
Flags that influence the behaviour of the externalize manager

Constructor Detail

StringResource

public StringResource(String string)
Default c'tor externalizing this resource as text/plain MIME document.

Parameters:
string -

StringResource

public StringResource(String string,
                      String extension,
                      String mimeType)

StringResource

public StringResource(String string,
                      String extension,
                      String mimeType,
                      int externalizerFlags)
Method Detail

getLength

public int getLength()
Overrides:
getLength in class Resource

getId

public String getId()
Get the id that identifies this resource as an externalized object. If the object has not been externalized yet, it will be externalized.

Overrides:
getId in class Resource
Returns:
the externalization id

getURL

public SimpleURL getURL()
Description copied from interface: URLResource
returns the URL, this resource can be fetched from. This URL may be relative, usually if generated from the externalizer.

Specified by:
getURL in interface URLResource
Specified by:
getURL in class Resource

write

public final void write(Device out)
                 throws IOException
Description copied from interface: Renderable
Write this Renderable component to some output device.

Throws:
IOException

getExternalizerFlags

public int getExternalizerFlags()


wingS Swings ;-)