Solved

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

Posted on 2009-07-16
3
240 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
nextBoolean(double p) for Random class 3 41
MySqlDump not dumping triggers 1 43
pagenation logic how it is working in my code 1 53
Java program running SQL query 5 37
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…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
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 tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

809 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