🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #367

Re: How can I change data in a file?

#367
From: Paul Furbacher TeamB
Date: Wed, 15 Oct 2003 04:22
33 lines
1810 bytes
In <3f8c6a8e$1@newsgroups.borland.com> Eun wrote:

>  I have a file "test.txt" with data below;
>  --------------------
>  LB = 0.1500000
>  
>  OPP = 30.00000
>  
>  MAX = 40.00000
>  
>  ------------------------------
>  
>  I want to change the numbers and save the file.

Adrian provided one way of solving your problem (see
parallel response).  

However, if you are open to changing the file extension
from .txt to .properties, you could use the java.util.Properties
class to handle this very easily.


Paul Furbacher [TeamB]

  Save time, search the archives:
       http://info.borland.com/newsgroups/ngsearch.html
       
  Is it in Joi Ellis's Faq-O-Matic? 
       http://www.visi.com/~gyles19/fom-serve/cache/1.html
 
  Finally, please send responses to the newsgroup only.
  That means, do not send email directly to me.
  Thank you.
Technical Details
Message-ID: <20031015002246305-0400@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f8c6a8e$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,8cb841adb87efb60
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2003-10-14 21:39:01 PST
User-Agent: Halime (MacOSX)/1.0rc2b
Newsgroups: borland.public.jbuilder.java.api
Message-ID: <20031015002246305-0400@newsgroups.borland.com>
References:  <3f8c6a8e$1@newsgroups.borland.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"
Subject: Re: How can I change data in a file?
From: Paul Furbacher [TeamB] <pfurbacher@mac.com>
Organization: Reverse Alchemy, Inc.
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 68.39.103.120
Date: 14 Oct 2003 21:22:43 -0700
X-Trace: newsgroups.borland.com 1066191763 68.39.103.120 (14 Oct 2003 21:22:43 -0700)
Lines: 33
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail