• Post Reply Bookmark Topic Watch Topic
  • New Topic

moving pointer of the file  RSS feed

 
Glories Moh
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

I hope you all fine

I wanna write on txt file using java

My question is : How I can start writing from the position I stopped at last time?

For example, If my file was

Gloor
Gloor
*

how I can start writing from the * ?

Thanks in advance

 
Rob Spoor
Sheriff
Posts: 21131
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
FileOutputStream and FileWriter both have constructors that let you append to the file instead of overwriting it.
 
Glories Moh
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Spoor wrote:FileOutputStream and FileWriter both have constructors that let you append to the file instead of overwriting it.


Thank you I found it
 
Rob Spoor
Sheriff
Posts: 21131
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!