Solved

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

Posted on 2009-07-16
3
243 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 60

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 60

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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This video teaches viewers about errors in exception handling.

724 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