Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Why PrintWriter is not buffered ?

 
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 ?
 
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.


 
grapes are vegan food pellets. Eat this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic