• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Java Help Program

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Please help me ...
How to modify the contents of a file in Java.......
 
Sheriff
Posts: 6186
164
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A text file?  Please TellTheDetails (that's a link).
 
Ranch Hand
Posts: 38
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1.FileInputStream  read file  content
2. modify content
3.FileOutputStream write content to file
 
Marshal
Posts: 65447
248
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

joseph hu wrote:1.FileInputStream  read file  content
2. modify content
3.FileOutputStream write content to file

That is one way to try it, but you are using the wrong sort of classes.
 
The overall mission is to change the world. When you've done that, then you can read this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!