File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes string manipulation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "string manipulation" Watch "string manipulation" New topic
Author

string manipulation

pvsr rao
Ranch Hand

Joined: Oct 05, 2005
Posts: 102
i have one string.i have to create a one file and copy the string into that file.how to do this.
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
This sounds like file manipulation, not String manipulation. To create a file and write to it, you should use either FileOutputStream or FileWriter. See the link to the Java tutorial in my signature for some information about these and other input and output stream classes.

Layne


Java API Documentation
The Java Tutorial
Akshay Kiran
Ranch Hand

Joined: Aug 18, 2005
Posts: 220
to write something on file is called serialization
(your topic could have been "writing a string on file" rather than "string manipulation")
to read/write from files, you need to first import the
java.io package
and then use the classes to open the desired file and write the string at hand onto it.
I think you are new to I/O and I suggest you do a bit of reading before asking for a solution directly. Try searching the I/O forum and make a beginning with the java tutorial.

happy programming


"It's not enough that we do our best; sometimes we have to do<br />what's required."<br /> <br />-- Sir Winston Churchill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: string manipulation