Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JspWriter

 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JspWriter extends java.io.Writer, and JspWriter is a special kind of PrintWriter. Is JspWriter an instance of the PrintWriter?
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This from the API
This abstract class emulates some of the functionality found in the java.io.BufferedWriter and java.io.PrintWriter classes, however it differs in that it throws java.io.IOException from the print methods while PrintWriter does not.

------------------
I Hope This Helps
Carl Trusiak, SCJP2
 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have read these sentences from the JSP2.3 specification. Is "emulates functionality" of the BufferedWriter and PrintWriter equivalent to saying that JspWriter is an instance of the PrintWriter and BufferedWriter?
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 3752
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. As is evident from the inheritance tree shown at the top of javadoc for this class:

And if you further look for the inheritance tree for PrintWriter, you'll know that PrintWriter and JspWriter are actually siblings.


------------------
SCJP2, SCWCD Resources, Free Question A Day, Mock Exam Results and More!
www.jdiscuss.com
Get Certified, Guaranteed!
JQPlus - For SCJP2
JWebPlus - For SCWCD
JDevPlus - For SCJD
 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a log, Paul.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic