cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Diephouse" <...@envoisolutions.com>
Subject Re: Proposed change to getWriter(...) in FileWriterUtil class
Date Fri, 04 May 2007 10:28:01 GMT
I suppose that would be fine. Can you create a patch and submit it via JIRA?

- Dan

On 5/2/07, Nolan, Edell <Edell.Nolan@iona.com> 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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message