Return-Path: Delivered-To: apmail-incubator-cxf-dev-archive@locus.apache.org Received: (qmail 1629 invoked from network); 4 May 2007 10:28:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 May 2007 10:28:28 -0000 Received: (qmail 68782 invoked by uid 500); 4 May 2007 10:28:34 -0000 Delivered-To: apmail-incubator-cxf-dev-archive@incubator.apache.org Received: (qmail 68668 invoked by uid 500); 4 May 2007 10:28:32 -0000 Mailing-List: contact cxf-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-dev@incubator.apache.org Delivered-To: mailing list cxf-dev@incubator.apache.org Received: (qmail 68650 invoked by uid 99); 4 May 2007 10:28:32 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 May 2007 03:28:32 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [209.85.134.191] (HELO mu-out-0910.google.com) (209.85.134.191) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 May 2007 03:28:23 -0700 Received: by mu-out-0910.google.com with SMTP id w1so819275mue for ; Fri, 04 May 2007 03:28:01 -0700 (PDT) Received: by 10.82.188.15 with SMTP id l15mr6263689buf.1178274481154; Fri, 04 May 2007 03:28:01 -0700 (PDT) Received: by 10.82.100.10 with HTTP; Fri, 4 May 2007 03:28:01 -0700 (PDT) Message-ID: <7b774c950705040328h7d42483yf00d0bacbee23b6d@mail.gmail.com> Date: Fri, 4 May 2007 12:28:01 +0200 From: "Dan Diephouse" To: cxf-dev@incubator.apache.org Subject: Re: Proposed change to getWriter(...) in FileWriterUtil class In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_35230_8923379.1178274481112" References: X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_35230_8923379.1178274481112 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I suppose that would be fine. Can you create a patch and submit it via JIRA? - Dan On 5/2/07, Nolan, Edell wrote: > > Hi, > > Is it possible that someone could add a new method or change the > existing one. > > In the FileWriterUtil class in org.apache.cxf.tools.util; > > In the getWriter(...) method - you assume that the encoding is always > UTF-8 - this may not always be the case. > > In Yoko we want to be able to give the user an option to specify the > encoding they want. > > So we could pass in the encoding here. > > thanks, Edell. > > > public class FileWriterUtil { > > public Writer getWriter(String packageName, String fileName) > throws IOException { > File dir = buildDir(packageName); > File fn = new File(dir, fileName); > if (fn.exists() && !fn.delete()) { > throw new IOException(fn + ": Can't delete previous > version"); > } > return new OutputStreamWriter(new BufferedOutputStream(new > FileOutputStream(fn)), "UTF-8"); > } > -- Dan Diephouse Envoi Solutions http://envoisolutions.com | http://netzooid.com/blog ------=_Part_35230_8923379.1178274481112--