We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

writing to outputstream

felgen
felgen asked
on
Medium Priority
624 Views
Last Modified: 2008-03-17
If I perform a pw.println to an outputstream with a stringbuffer
containing lots of data it takes a too long time to do this.

sample code

PrintWriter pw = new PrintWriter(
                new BufferedOutputStream(clientSocket.getOutputStream(), 1024), false);

pw.println(adminDbConnect.processInput(inputLine));;
               
pw.flush();
Comment
Watch Question

Michel PlungjanIT Expert
CERTIFIED EXPERT
Top Expert 2009

Commented:
It seems that under 1.0.2 print() is really slow

Michel

Author

Commented:
print() or println()?
But I'm using 1.1.4!
Michel PlungjanIT Expert
CERTIFIED EXPERT
Top Expert 2009

Commented:
Then I dunno - sorry.

Michel

PS: print or println - wouldn't they both be slow if one was???
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.