🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #15625

Re: double value to file text

#15625
From: Hungria Berbesi
Date: Tue, 18 May 1999 00:00
42 lines
1918 bytes
Hello!!

Thanks, I received this answer:
>
> You are getting the extra 'spaces' in the text because you are
outputting
> the unicode characters (which are two bytes) instead of bytes.  If you
> just want to write the characters as bytes using the default encoding
for
> your platform, then you need to change the writeChars calls to
writeBytes.
>
I do it, and my text file is o.k. (I use dataOutputStream). I change
writeChars to
writeBytes.
I can see my text file into a editor, and it is o.k.
Now, Ho can I do read the text  file, and put the values into a
textfields??

Do I need to change the DataOutputStream to printWriter??

(Sorry, i speak a little english)

thanks in advance.

Hungria
///////////////////////////////////////////////
Steve Schafer (TeamB) wrote:

> On Tue, 18 May 1999 09:55:04 -0400, Hungria Berbesi
> <hungria@ing.ula.ve> wrote:
>
> >Here is a code make for me, but, my file text is bad, because
> >the values have a blanks in int.
>
> It looks like you are using DataOutputStream (or possibly
> ObjectOutputStream) for your file. The reason you're seeing blanks is
> that DataOutputStream writes Unicode (16-byte) characters. But you
> want ANSI (8-byte) characters. To do that, use PrintWriter (or
> PrintStream if you're using JDK 1.0) instead of DataOutputStream.
>
> -Steve
Technical Details
Message-ID: <3741B945.FE7B5B58@ing.ula.ve>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <37417137.69AF1A31@ing.ula.ve> <375180ca.68971165@90.0.0.40>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,e82beaabf6dbe49f,start
X-Google-Attributes: gidf74b3,public
From: Hungria Berbesi <hungria@ing.ula.ve>
Subject: Re: double value to file text
Date: 1999/05/18
Message-ID: <3741B945.FE7B5B58@ing.ula.ve>
X-Deja-AN: 478800879
Content-Transfer-Encoding: 7bit
References: <37417137.69AF1A31@ing.ula.ve> <375180ca.68971165@90.0.0.40>
Organization: Another Netscape Collabra Server User
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language