Please how to get a specified data from a file?? in java
and what is the substitution of the seek function in java???
I need information
Thanks

Recommended Answers

All 2 Replies

Please how to get a specified data from a file?? in java
and what is the substitution of the seek function in java???
I need information
Thanks

Hello,

Lesson : Basic I/O
http://java.sun.com/docs/books/tutorial/essential/io/index.html

File I/O : To manipulates files.
File I/O Streams : To read and write.

Next time, Please do good search in forum and on Java docs website before posting.

Regards,

java.io.RandomAccessFile class - Instances of this class support both reading and writing to a random access file. A random access file behaves like a large array of bytes stored in the file system. There is a kind of cursor, or index into the implied array, called the file pointer; input operations read bytes starting at the file pointer and advance the file pointer past the bytes read. If the random access file is created in read/write mode, then output operations are also available; output operations write bytes starting at the file pointer and advance the file pointer past the bytes written. Output operations that write past the current end of the implied array cause the array to be extended. The file pointer can be read by the getFilePointer method and set by the seek method.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.