Solved

what is the use of skip() in the BufferedReader class?

Posted on 2009-07-16
3
234 Views
Last Modified: 2013-11-23
H i want to know the usage of the skip() in the BufferedReader class?
0
Comment
Question by:haneefnb
  • 2
3 Comments
 
LVL 59

Expert Comment

by:Kevin Cross
ID: 24870977
Hello haneefnb

It allows you to skip over a certain number of characters specified as a long value passed like skip(100) will skip over 100 characters so that when you call read() next you get the 101st character instead of the 1st from where you currently are in the buffered reader.

Hopefully that makes sense.

Regards,

mwvisa1
0
 

Author Comment

by:haneefnb
ID: 24871017
thank u mwvisa1

could u please give me a example for this
0
 
LVL 59

Accepted Solution

by:
Kevin Cross earned 500 total points
ID: 24871160

BufferedReader br = new BufferedReader(new FileReader("anyfile.txt"));

br.skip(100);

Open in new window

0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now