• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to move to the begining of a file  RSS feed

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Respected sir,
I am reding a fie and after some line I want to move to the beginning of the file ....
kindly give me some idea about this .......

As in 'C' we have fseek(); is there any method supporting to this application in java ...................
please give me some idea

Thank you
Pradipta kuamr rout
 
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Both FileChannel and RandomAccessFile allow you to set the absolute position. You can get a FileChannel from an existing FileInputStream, FileOutputStream or RandomAccessFile.
 
pradipta kumar rout
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you..
Rob Spoor for your help..
 
Rob Spoor
Sheriff
Posts: 21135
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!