Solved

difference between System.out.write and output.write

Posted on 2010-11-22
4
697 Views
Last Modified: 2012-05-10
I want to make sure that my understanding about  the difference between System.out.write and output.write is correct.

System.out.write(buffer, 0, bufferCount);  will write the contents of buffer upto bufferCount to the console
whereas
 output.write(buffer, 0, bufferCount);  will wrtie teh content of buffer upto bufferCount  to the  outputStream (assuming output is outputStream).

Please correct me if I'm wrong
0
Comment
Question by:javaCaravan0
  • 3
4 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 34187231
You don't say what type 'output' is ...
0
 

Author Comment

by:javaCaravan0
ID: 34187290
output type is servletOutputStream
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 125 total points
ID: 34187475
Your analysis is right
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 34362396
:)
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
thymeleaf natural templating vs JSP 2 95
Java Timer (static) 9 43
eclipse with Angularjs2.0 3 34
tomcat administrtor 12 46
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
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.

815 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

12 Experts available now in Live!

Get 1:1 Help Now