?
Solved

Reading data Line by Line using ByteArrayInputStream Class

Posted on 2003-03-05
1
Medium Priority
?
433 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
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

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

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

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
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:
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses
Course of the Month3 days, 7 hours left to enroll

598 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