2 // This software is now distributed according to
\r
3 // the Lesser Gnu Public License. Please see
\r
4 // http://www.gnu.org/copyleft/lesser.txt for
\r
6 // -- Happy Computing!
\r
8 package com.stevesoft.pat.wrap;
\r
12 import com.stevesoft.pat.*;
\r
14 /** Allows the outcome of a replaceAll() or replaceFirst()
\r
15 to be directed to a Writer rather than a String.
\r
17 The method toStringLike() cannot work, however.
\r
18 This means that the return value of replaceAll() will
\r
19 be null if this Object is used as the StringBufferLike.*/
\r
20 public class WriterWrap
\r
21 implements BasicStringBufferLike
\r
24 public WriterWrap(Writer w)
\r
29 public void append(char c)
\r
35 catch (IOException ioe)
\r
39 public void append(String s)
\r
45 catch (IOException ioe)
\r
49 /** This operation can't really be done. */
\r
50 public StringLike toStringLike()
\r
55 public Object unwrap()
\r