problems with MARK,RESET,SKIP methods of Java IO Handling

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dmjpro
    Top Contributor
    • Jan 2007
    • 2476

    problems with MARK,RESET,SKIP methods of Java IO Handling

    i have been working with IO handling for 3-4 months.
    but still i not understood the funda of the three methods ....
    MARK,RESET,SKIP provided for IO handling.

    plz explain these methods with sample codes.
    Regards.
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by dmjpro
    i have been working with IO handling for 3-4 months.
    but still i not understood the funda of the three methods ....
    MARK,RESET,SKIP provided for IO handling.

    plz explain these methods with sample codes.
    Regards.
    What part of those methods (they're typeset in lowercase btw) don't you understand?
    Have you read the API documentation?

    kind regards,

    Jos

    Comment

    • dmjpro
      Top Contributor
      • Jan 2007
      • 2476

      #3
      yes i read the API document ....
      but it would be better if u make me understand in details with sample code.

      Thanxxx .....
      Regards

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        Originally posted by dmjpro
        yes i read the API document ....
        but it would be better if u make me understand in details with sample code.

        Thanxxx .....
        Regards
        Mark and reset work in pairs: you mark a position and supply a buffersize, say n.
        You can read at most n characters and optionally reset the reader to the marked
        position. If you have read more than n characters the reset fails.

        Skipping m characters is similar to reading m characters, they just aren't
        returned. Skipping more than n characters causes the reset to fail too.

        kind regards,

        Jos

        Comment

        Working...