This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes When to use seek? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "When to use seek?" Watch "When to use seek?" New topic

When to use seek?

abalfazl hossein
Ranch Hand

Joined: Sep 06, 2007
Posts: 635
When to use seek in JAVA? for which filed?
Aniruddh Joshi
Ranch Hand

Joined: Jul 29, 2008
Posts: 275

Its used in Random Access Files , that is when you want to look up a particular location / character in a file

"One of the best things you could do is to simplify a larger application into a smaller one by reducing its process and complexity - Fowler"
Rob Spoor

Joined: Oct 27, 2005
Posts: 19654

It's usually only useful for binary files where you know exactly at which position a byte (or a group of bytes) will be located.

How To Ask Questions How To Answer Questions
I agree. Here's the link:
subject: When to use seek?
Similar Threads
Please any body help me
how to randomly access a text file
Seek Method for files(Urgent)
How can I paging use mysql'seek function?