• Post Reply Bookmark Topic Watch Topic
  • New Topic

Why PrintWriter is not buffered ?  RSS feed

 
Sim Kim
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In JSP there is an implicit variable "out" which is buffered by default . "out" is of type JspWriter extends PrinttWriter . Then in servlets why PrintWriter is not buffered ?
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is a part of architecture design. They have logic behind doing so.

Read this

 
Sim Kim
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Chetan,

But same thing could have been done for PrintWriter too right .
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Lavjeet Khanuja:
Hi Chetan,
But same thing could have been done for PrintWriter too right .


Right Lavjeetjee, but it is a part of architecture that one is unbuffered and other is buffered.

There is not technical limitation behind this (as both extends java.io.Writer), but there may be design considerations / constraints.
 
Sim Kim
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Chetan,

I want to know the Design considerations which made Sun to make JspWriter buffered ?

I have posted the same question in developers.sun.com forum , but till now no response .
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Lavjeet Khanuja:
I want to know the Design considerations which made Sun to make JspWriter buffered ?

Someone who was the part of design team or working with Sun is in a position to reply to your queries.

Originally posted by Lavjeet Khanuja:
I have posted the same question in developers.sun.com forum , but till now no response.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!