cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andreasm...@apache.org
Subject svn commit: r535305 - /incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/FileWriterUtil.java
Date Fri, 04 May 2007 16:02:44 GMT
Author: andreasmyth
Date: Fri May  4 09:02:43 2007
New Revision: 535305

URL: http://svn.apache.org/viewvc?view=rev&rev=535305
Log:
Applies Edell's patch for [JIRA CXF-634]

Modified:
    incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/FileWriterUtil.java

Modified: incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/FileWriterUtil.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/FileWriterUtil.java?view=diff&rev=535305&r1=535304&r2=535305
==============================================================================
--- incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/FileWriterUtil.java
(original)
+++ incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/FileWriterUtil.java
Fri May  4 09:02:43 2007
@@ -55,6 +55,13 @@
     public static Writer getWriter(File fn) throws IOException {
         return new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(fn)),
"UTF-8");
     }
+
+    public static Writer getWriter(File fn, String encoding) throws IOException {
+        if (encoding == null) {
+            encoding = "UTF-8";
+        }
+        return new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(fn)),
encoding);
+    }
     
     public Writer getWriter(String packageName, String fileName) throws IOException {
         return getWriter(getFileToWrite(packageName, fileName));



Mime
View raw message