Article View: borland.public.jbuilder.java.api
Article #3224Re: Outputing Text with CR LF
From: Michael Hall
Date: Sun, 15 Mar 1998 00:00
Date: Sun, 15 Mar 1998 00:00
30 lines
1441 bytes
1441 bytes
Thanks for the reply Jim. I tried that code and it still outputs the UNIX
style line feeds. But it may have something to do with the fact that I have
a very large string that is outputted from a text box that has embedded line
feeds. I only notice the linefeeds when using an inferior editor such as
notepad( that comes with Windows).
Is there a way to manually enter the character that I need to output the
text?
Thanks for your time,
Michael Hall
>> How do I output text to a file that uses DOS linefeeds CR LF instead
>> of the
>> UNIX linefeeds.
>
>this works for me:
>
> FileOutputStream f = new FileOutputStream("c:\\mytext.txt");
> PrintWriter p = new PrintWriter(f);
> String out = new String();
> p.println("1st line");
> p.println("2nd line");
> p.flush();
> p.close(); // supposedly does a flush but i do one above anyway
>
>Jim
>
>
Technical Details
Message-ID:
<6eilni$msd3@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6e881t$cbe6@forums.borland.com> <35082E96.68FC4872@ForAWhile.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,276da222d753057e X-Google-Attributes: gid1089d0,public From: "Michael Hall" <mhall01@ibm.net> Subject: Re: Outputing Text with CR LF Date: 1998/03/15 Message-ID: <6eilni$msd3@forums.borland.com> X-Deja-AN: 334474968 References: <6e881t$cbe6@forums.borland.com> <35082E96.68FC4872@ForAWhile.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.api