Reading and writing to a file.
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Rashid_Rupani
Posted On:   Friday, August 20, 2004 02:45 AM

How to extract data from txt files and write into another txt file in a predefined format



Example

1- Read data between "|-" and "-|"
xxxxxxx|-product a-|xxxxxxxx|- prodcut b-|xxxxx|- product c -| xxxxxx |- product d -|


2- And now write in txt file in a format defined below
product a | prodcut b | product c |


Can anyone provide me source code for this. This will help me alot.

Looking for a positive answer.

Re: Reading and writing to a file.

Posted By:   Rashid_Rupani  
Posted On:   Saturday, August 21, 2004 04:26 AM

This is not my homework. I am learning through books. If i got source code. It will help me alot in my self learning process.

Re: Reading and writing to a file.

Posted By:   Benoit_Quintin  
Posted On:   Friday, August 20, 2004 06:57 AM

1- Look at StreamTokenizer.

2- java.io.FileOutputStream

Nope I will NOT provide code for this, do your homework.



     Here's your positive answer : "Yes"

About | Sitemap | Contact