2 // This software is now distributed according to
3 // the Lesser Gnu Public License. Please see
4 // http://www.gnu.org/copyleft/lesser.txt for
8 package com.stevesoft.pat.wrap;
10 import java.io.IOException;
11 import java.io.Writer;
13 import com.stevesoft.pat.BasicStringBufferLike;
14 import com.stevesoft.pat.StringLike;
17 * Allows the outcome of a replaceAll() or replaceFirst() to be directed to a
18 * Writer rather than a String.
20 * The method toStringLike() cannot work, however. This means that the return
21 * value of replaceAll() will be null if this Object is used as the
24 public class WriterWrap implements BasicStringBufferLike
28 public WriterWrap(Writer w)
33 public void append(char c)
38 } catch (IOException ioe)
43 public void append(String s)
48 } catch (IOException ioe)
53 /** This operation can't really be done. */
54 public StringLike toStringLike()
59 public Object unwrap()