things.common.impl
Class StringPosterStringBuffer

java.lang.Object
  extended by things.common.impl.StringPosterStringBuffer
All Implemented Interfaces:
StringPoster

public class StringPosterStringBuffer
extends java.lang.Object
implements StringPoster

Postable implementation for printing to a StringBuffer. It will automatically instantiate the buffer on contruction. There is no way to reintialize it. It will just continue to add until disposed.

Each post will be seperated with a CR/LF sequence.

Version:
1.0 Version History EPG - Initial - 16Mar04
Author:
Erich P. Gatejen

Constructor Summary
StringPosterStringBuffer()
          Constructor.
 
Method Summary
 void flush()
          Try to flush.
 void post(java.lang.String message)
          Post as a message.
 void postit(java.lang.String message)
          Post as a message.
 java.lang.String toString()
          Return the contents of this StringBuffer as a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringPosterStringBuffer

public StringPosterStringBuffer()
Constructor.

Method Detail

post

public void post(java.lang.String message)
          throws ThingsException
Post as a message.

Specified by:
post in interface StringPoster
Parameters:
message - String to post
Throws:
ThingsException

postit

public void postit(java.lang.String message)
Post as a message. Best effort. Ignore errors.

Specified by:
postit in interface StringPoster
Parameters:
message - String to post

toString

public java.lang.String toString()
Return the contents of this StringBuffer as a String.

Overrides:
toString in class java.lang.Object
Returns:
the contents

flush

public void flush()
Try to flush. Never error no matter what.

Specified by:
flush in interface StringPoster


Things.