Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sudden break in generated outputfile

Status
Not open for further replies.

Swamphen

Programmer
Jul 17, 2001
84
IT
I'm experiencing a file-manipulation-problem:

My program reads in a textfile, which contains data in a certain format and produces a new textfile containing the data in the desired format (for analyzing-purposes).

The constructor of my convertor is as follows:


public Convertor (String i, String o) throws FileNotFoundException, IOException{

input=new FileReader(i);
st=new StreamTokenizer(input);
os=new FileOutputStream(o);
output=new PrintWriter(os);

}

Problem: the output is generated correctly, though suddenly stops.


Should I use different read-write constructs, which allow me to define bufferlengths?

Thanks
 
It's a good thing nobody bothered to answer yet...

I forgot a super-elementary thing: close the printwriter after the conversionoperation.

Sorry.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top