com.stevesoft.pat.wrap
Class WriterWrap

java.lang.Object
  |
  +--com.stevesoft.pat.wrap.WriterWrap
All Implemented Interfaces:
BasicStringBufferLike


public class WriterWrap
extends java.lang.Object
implements BasicStringBufferLike

Allows the outcome of a replaceAll() or replaceFirst() to be directed to a Writer rather than a String.

The method toStringLike() cannot work, however. This means that the return value of replaceAll() will be null if this Object is used as the StringBufferLike.


Constructor Summary
WriterWrap(java.io.Writer w)
           
 
Method Summary
 void append(char c)
           
 void append(java.lang.String s)
           
 StringLike toStringLike()
          This operation can't really be done.
 java.lang.Object unwrap()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WriterWrap

public WriterWrap(java.io.Writer w)
Method Detail

append

public void append(char c)
Specified by:
append in interface BasicStringBufferLike

append

public void append(java.lang.String s)
Specified by:
append in interface BasicStringBufferLike

toStringLike

public StringLike toStringLike()
This operation can't really be done.
Specified by:
toStringLike in interface BasicStringBufferLike

unwrap

public java.lang.Object unwrap()
Specified by:
unwrap in interface BasicStringBufferLike