merge from 2_4_Release branch
[jalview.git] / src / com / stevesoft / pat / wrap / WriterWrap.java
index 1b7f6c2..e72b5fa 100755 (executable)
@@ -1,59 +1,61 @@
-//\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 java.io.*;\r
-\r
-import com.stevesoft.pat.*;\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
-  {\r
-    this.w = w;\r
-  }\r
-\r
-  public void append(char c)\r
-  {\r
-    try\r
-    {\r
-      w.write( (int) c);\r
-    }\r
-    catch (IOException ioe)\r
-    {}\r
-  }\r
-\r
-  public void append(String s)\r
-  {\r
-    try\r
-    {\r
-      w.write(s);\r
-    }\r
-    catch (IOException ioe)\r
-    {}\r
-  }\r
-\r
-  /** This operation can't really be done. */\r
-  public StringLike toStringLike()\r
-  {\r
-    return null;\r
-  }\r
-\r
-  public Object unwrap()\r
-  {\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;
+  }
+}