Results 1 to 2 of 2
Thread: Problem in File Creation
- 03-15-2011, 11:22 AM #1
Member
- Join Date
- Mar 2011
- Location
- Chennai,TamilNadu,India
- Posts
- 1
- Rep Power
- 0
Problem in File Creation
I am a java beginner... I am doing a small standalone application.. In which i am using files..
In my code i want to get customer details and to store it in a file..i am using following code for doing that...
But while using this code..for each execution one file is created and details getting added and in next execution the old file is deleted along with the details....but i need one file is to be created and only details to be added in each execution...help me pls.... :confused:Java Code:File customer = new File("customer details.txt"); FileOutputStream fop1 = new FileOutputStream(customer); fop1.write(customerName.getBytes()); fop1.write(customerCompany.getBytes()); fop1.write(customerAddress.getBytes()); fop1.flush(); fop1.close();
- 03-15-2011, 11:27 AM #2
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 7
Similar Threads
-
PDF File creation Error
By siva_vs_siva in forum New To JavaReplies: 2Last Post: 12-24-2010, 12:42 AM -
Creation of ResourceBundle Object of propetirs file using only substring of file name
By kalwankark in forum Advanced JavaReplies: 0Last Post: 11-26-2010, 10:10 PM -
JAR file creation
By Cluster Storm in forum AWT / SwingReplies: 4Last Post: 06-10-2010, 03:38 AM -
Jar file creation
By raghu9198 in forum New To JavaReplies: 4Last Post: 01-11-2009, 03:40 AM -
Executable Jar File Creation
By Doctor Cactus in forum New To JavaReplies: 7Last Post: 11-13-2008, 03:31 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks