Solved

difference between System.out.write and output.write

Posted on 2010-11-22
4
707 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
[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
  • 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Java exception bubble up 2 26
jsp login check 12 66
Is Applet the way to go for my drag and drop system? 8 51
What is the use of Forwarding Class in java 1 53
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
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…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Suggested Courses

738 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