Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-26-2008, 10:33 AM
Member
 
Join Date: Mar 2008
Posts: 24
Azndaddy is on a distinguished road
[SOLVED] Save the current buffer to file
Hi, im new here and new to java

i was wondering if someone could help me out with some code on how to save the current buffer to a file.


Thanks heaps

regard
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-28-2008, 05:56 PM
DonCash's Avatar
Moderator
 
Join Date: Aug 2007
Location: London, UK
Posts: 239
DonCash will become famous soon enoughDonCash will become famous soon enough
Code:
Writer output = null; output = new BufferedWriter(new FileWriter("myfile.txt")); String newline = System.getProperty("line.separator"); output.write("whatever you want"); output.write(newline); output.close();
__________________
Did this post help you? Please
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
me!

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 03-29-2008, 08:46 AM
Member
 
Join Date: Mar 2008
Posts: 24
Azndaddy is on a distinguished road
Thanks heaps
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Save/Load Vector to/from file Java Tip java.lang 0 04-14-2008 09:37 PM
How to get Current Directory through File Java Tip java.io 0 04-05-2008 11:14 AM
[SOLVED] Delete Current line from file Azndaddy New To Java 1 03-28-2008 01:37 PM
save file to database katerinaaa New To Java 0 08-14-2007 01:15 PM
How can I make the file ALWAYS save as .txt by default paul AWT / Swing 1 08-07-2007 06:09 AM


All times are GMT +3. The time now is 04:34 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org