-//\r
-// This software is now distributed according to\r
-// the Lesser Gnu Public License. Please see\r
-// http://www.gnu.org/copyleft/lesser.txt for\r
-// the details.\r
-// -- Happy Computing!\r
-//\r
-package com.stevesoft.pat.wrap;\r
-\r
-import com.stevesoft.pat.*;\r
-import java.io.*;\r
-\r
-/** Allows the outcome of a replaceAll() or replaceFirst()\r
- to be directed to a Writer rather than a String.\r
- <p>\r
- The method toStringLike() cannot work, however.\r
- This means that the return value of replaceAll() will\r
- be null if this Object is used as the StringBufferLike.*/\r
-public class WriterWrap\r
- implements BasicStringBufferLike\r
- {\r
- Writer w;\r
- public WriterWrap(Writer w) {\r
- this.w = w;\r
- }\r
- public void append(char c) {\r
- try {\r
- w.write((int)c);\r
- } catch(IOException ioe) {}\r
- }\r
- public void append(String s) {\r
- try {\r
- w.write(s);\r
- } catch(IOException ioe) {}\r
- }\r
-\r
- /** This operation can't really be done. */\r
- public StringLike toStringLike() {\r
- return null;\r
- }\r
-\r
- public Object unwrap() {\r
- return w;\r
- }\r
-}\r
+//
+// This software is now distributed according to
+// the Lesser Gnu Public License. Please see
+// http://www.gnu.org/copyleft/lesser.txt for
+// the details.
+// -- Happy Computing!
+//
+package com.stevesoft.pat.wrap;
+
+import java.io.*;
+
+import com.stevesoft.pat.*;
+
+/**
+ * Allows the outcome of a replaceAll() or replaceFirst() to be directed to a
+ * Writer rather than a String.
+ * <p>
+ * 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.
+ */
+public class WriterWrap implements BasicStringBufferLike
+{
+ Writer w;
+
+ public WriterWrap(Writer w)
+ {
+ this.w = w;
+ }
+
+ public void append(char c)
+ {
+ try
+ {
+ w.write((int) c);
+ } catch (IOException ioe)
+ {
+ }
+ }
+
+ public void append(String s)
+ {
+ try
+ {
+ w.write(s);
+ } catch (IOException ioe)
+ {
+ }
+ }
+
+ /** This operation can't really be done. */
+ public StringLike toStringLike()
+ {
+ return null;
+ }
+
+ public Object unwrap()
+ {
+ return w;
+ }
+}