wicket.util.resource
Class StringBufferResourceStream

java.lang.Object
  extended bywicket.util.resource.AbstractResourceStream
      extended bywicket.util.resource.AbstractStringResourceStream
          extended bywicket.util.resource.StringBufferResourceStream
All Implemented Interfaces:
IModifiable, IResourceStream, IStringResourceStream, java.io.Serializable

public class StringBufferResourceStream
extends AbstractStringResourceStream

A string resource that can be appended to.

Author:
Jonathan Locke
See Also:
Serialized Form

Constructor Summary
StringBufferResourceStream()
          Constructor.
StringBufferResourceStream(java.lang.String contentType)
          Constructor.
 
Method Summary
 void append(java.lang.String s)
          Adds to this string buffer resource
 java.lang.String asString()
           
 void clear()
          Clears the string buffer resource.
protected  java.lang.String getString()
           
 long length()
          Gets the size of this resource
 void prepend(java.lang.String s)
          Prepends to this string buffer resource
 
Methods inherited from class wicket.util.resource.AbstractStringResourceStream
close, getContentType, getInputStream, lastModifiedTime, setLastModified
 
Methods inherited from class wicket.util.resource.AbstractResourceStream
getCharset, setCharset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringBufferResourceStream

public StringBufferResourceStream()
Constructor.


StringBufferResourceStream

public StringBufferResourceStream(java.lang.String contentType)
Constructor.

Parameters:
contentType - The mime type of this resource, such as "image/jpeg" or "text/html"
Method Detail

append

public void append(java.lang.String s)
Adds to this string buffer resource

Parameters:
s - The string to add

prepend

public void prepend(java.lang.String s)
Prepends to this string buffer resource

Parameters:
s - The string to prepend

clear

public void clear()
Clears the string buffer resource.


getString

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

asString

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

length

public long length()
Description copied from interface: IResourceStream
Gets the size of this resource

Returns:
The size of this resource in the number of bytes
See Also:
IResourceStream.length()


Copyright © 2004-2005 Wicket developers. All Rights Reserved.