File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes text file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "text file" Watch "text file" New topic

text file

Joey Alencar
Ranch Hand

Joined: Jun 26, 2001
Posts: 43
I�d like to know how can I manipulate a text file. For example: uploading, downloading, opening, reading and writing a text file.
mocca az
Ranch Hand

Joined: Mar 07, 2001
Posts: 93
You would need to explore the following -->
and the methods such as
++ createNewFile()
Atomically creates a new, empty file named by this abstract pathname if and only if a file with this name does not yet exist
++ delete()
Deletes the file or directory denoted by this abstract pathname
++ mkdir()
Creates the directory named by this abstract pathname
If you need to see how is this being done, book "JavaServer Pages: Your Visual Blueprint to Designing Dynamic Content with JSP" which you can find on has exact examples of what are you looking for.
m, phx

I agree. Here's the link:
subject: text file
It's not a secret anymore!