Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #7626

Re: Diff. between FileWriter("f.txt") and OutputStreamWriter(new FileOutputStream("f.txt")) ?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail
From Roedy Green <see_website@mindprod.com.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Diff. between FileWriter("f.txt") and OutputStreamWriter(new FileOutputStream("f.txt")) ?
Date Tue, 06 Sep 2011 06:53:41 -0700
Organization Canadian Mind Products
Lines 26
Message-ID <va9c67lo2nuvrk0bktto3pnhfohiurs9eo@4ax.com> (permalink)
References <4e57267d$0$6552$9b4e6d93@newsspool4.arcor-online.net>
Reply-To Roedy Green <see_website@mindprod.com.invalid>
NNTP-Posting-Host RCd/Ul4tyxGUBII8WGwa5g.user.speranza.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
X-Complaints-To abuse@aioe.org
X-Notice Filtered by postfilter v. 0.8.2
X-Newsreader Forte Agent 6.00/32.1186
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7626

Show key headers only | View raw


On 26 Aug 2011 04:52:14 GMT, jochen2@brenz.com (Jochen Brenzlinger)
wrote, quoted or indirectly quoted someone who said :

>
>1.) BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("MyFile.txt")));
>    out.write(s);
>
>and
>
>2.) BufferedWriter out = new BufferedWriter(new FileWriter("MyFile.txt"));
>    out.write(s);

You an use my code-generating Applet
http://mindprod.com/applet/fileio.html

You specify your needs with check boxes and it cranks out what I
consider the optimal code.
 
You may find playing with it will rapidly give you an idea of how you
can connect the various bits of the Java io lego set.
-- 
Roedy Green Canadian Mind Products
http://mindprod.com
The modern conservative is engaged in one of man's oldest exercises in moral philosophy; that is, 
the search for a superior moral justification for selfishness.
~ John Kenneth Galbraith (born: 1908-10-15 died: 2006-04-29 at age: 97) 

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Find similar


Thread

Diff. between FileWriter("f.txt") and OutputStreamWriter(new FileOutputStream("f.txt")) ? jochen2@brenz.com (Jochen Brenzlinger) - 2011-08-26 04:52 +0000
  Re: Diff. between FileWriter("f.txt") and OutputStreamWriter(new FileOutputStream("f.txt")) ? Silvio <silvio@moc.com> - 2011-08-26 09:22 +0200
  Re: Diff. between FileWriter("f.txt") and OutputStreamWriter(new FileOutputStream("f.txt")) ? Lew <lewbloch@gmail.com> - 2011-08-26 00:54 -0700
  Re: Diff. between FileWriter("f.txt") and OutputStreamWriter(new FileOutputStream("f.txt")) ? Roedy Green <see_website@mindprod.com.invalid> - 2011-08-31 14:13 -0700
  Re: Diff. between FileWriter("f.txt") and OutputStreamWriter(new FileOutputStream("f.txt")) ? Arne Vajhøj <arne@vajhoej.dk> - 2011-09-05 21:17 -0400
  Re: Diff. between FileWriter("f.txt") and OutputStreamWriter(new FileOutputStream("f.txt")) ? Mayeul <mayeul.marguet@free.fr> - 2011-09-06 11:34 +0200
    Re: Diff. between FileWriter("f.txt") and OutputStreamWriter(new FileOutputStream("f.txt")) ? Roedy Green <see_website@mindprod.com.invalid> - 2011-09-14 18:23 -0700
  Re: Diff. between FileWriter("f.txt") and OutputStreamWriter(new FileOutputStream("f.txt")) ? Roedy Green <see_website@mindprod.com.invalid> - 2011-09-06 06:53 -0700

csiph-web