aspose file tools
The moose likes Beginning Java and the fly likes How to move to the begining of a file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "How to move to the begining of a file " Watch "How to move to the begining of a file " New topic
Author

How to move to the begining of a file

pradipta kumar rout
Ranch Hand

Joined: Sep 13, 2010
Posts: 43
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
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19216

Both FileChannel and RandomAccessFile allow you to set the absolute position. You can get a FileChannel from an existing FileInputStream, FileOutputStream or RandomAccessFile.


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
pradipta kumar rout
Ranch Hand

Joined: Sep 13, 2010
Posts: 43
Thank you..
Rob Spoor for your help..
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19216

You're welcome.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How to move to the begining of a file
 
Similar Threads
Changing DB
One more line to my resume
File spliting and merging...
how to make a setup package for a java program
make a jdbc conecction pool from 0, using JSP, tomcat, mysql