?
Solved

Reading data Line by Line using ByteArrayInputStream Class

Posted on 2003-03-05
1
Medium Priority
?
362 Views
Last Modified: 2008-01-09
Hi all,

anybody know how to read data line by line using ByteArrayInput Stream


thanks in advance

/Siva
0
Comment
Question by:smk_dandu
[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
1 Comment
 
LVL 2

Accepted Solution

by:
functionpointer earned 200 total points
ID: 8078008
you are assuming your ByteArrayInputStream contains newlines? if so:
ByteArrayInputStream bais;
////
BufferedReader br = new BufferedReader( new InputStreamReader( bais );
String line = "";
while ( ( line = br.readLine() ) != null )
{
  // do what you want with the line here...
}
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
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…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
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.
Suggested Courses
Course of the Month8 days, 16 hours left to enroll

764 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