how do i track a file pointer in java

Discussion in 'Java' started by google_java, Jul 8, 2003.

  1. google_java

    google_java Guest

    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
     
    google_java, Jul 8, 2003
    #1
    1. Advertising

  2. google_java

    Roedy Green Guest

    On 8 Jul 2003 09:55:45 -0700, (google_java)
    wrote or quoted :

    >
    >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.



    --
    Canadian Mind Products, Roedy Green.
    Coaching, problem solving, economical contract programming.
    See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
     
    Roedy Green, Jul 8, 2003
    #2
    1. Advertising

  3. 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
    --
    Please reply in the newsgroup, not by email!
    Java programming tips: http://jiu.sourceforge.net/javatips.html
    Other Java pages: http://www.geocities.com/marcoschmidt.geo/java.html
     
    Marco Schmidt, Jul 8, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    10
    Views:
    745
    Chris Torek
    Feb 4, 2005
  2. jimjim
    Replies:
    16
    Views:
    876
    Jordan Abel
    Mar 28, 2006
  3. Replies:
    4
    Views:
    1,333
    Fred Zwarts
    Jul 2, 2009
  4. A
    Replies:
    7
    Views:
    658
  5. , India

    pointer to an array vs pointer to pointer

    , India, Sep 20, 2011, in forum: C Programming
    Replies:
    5
    Views:
    503
    James Kuyper
    Sep 23, 2011
Loading...

Share This Page