how do i track a file pointer in java

G

google_java

hi,

i have a file which contains various records, i have to process this
file, record by record.

i want to track the current record which is being processed.
how would i track the curent record being processed.

help required urgently.
a code snippet would be highly appreciated.

thanks in advance
google_java
 
R

Roedy Green

i want to track the current record which is being processed.
how would i track the curent record being processed.

To Java, the file is just a stream of bytes. Records are order you
impose, so it would be up to you to maintain a record count variable.

See http://mindprod.com/fileio.html for sample code.
 
M

Marco Schmidt

google_java:
i have a file which contains various records, i have to process this
file, record by record.

i want to track the current record which is being processed.
how would i track the curent record being processed.

help required urgently.
a code snippet would be highly appreciated.

Unless you talk a bit more about what you are doing I don't think that
there can be any help. What format does a record have? If you
sequentially read records, what do you mean by "keeping track"? You
always have one in memory, process it and save it back to another
file, I guess.

Regards,
Marco
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top