File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes JspWriter question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "JspWriter question" Watch "JspWriter question" New topic
Author

JspWriter question

Aruna Raghavan
Ranch Hand

Joined: May 14, 2002
Posts: 194
Hi,
How are the methods print(String) and write(String) are different on this class?
Thanks,
Aruna.


Aruna A. Raghavan<br />SCJP, SCJD, SCWCD
Dharmin Desai
Ranch Hand

Joined: Feb 28, 2002
Posts: 81
Dear aruna,
write(String) method is of java.io.Writer class which is extended by JspWriter class, who(JspWriter) is abstract in nature.
So the write(String) method comes through that channel, where as print(String) is a method of JspWriter class.
=> The Print(String) method in API has written following statements:
the string's characters are converted into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the Writer.write(int) method.

So, It is obvious that, Methods do not hv technical difference between them, but the important part plays by print(String) method is while converting to platform's default character encoding.
Hope i m clear enough,
Best regards, Dharmin


SCJP2 (93%),SCWCD(88%)<br />-------------------------------<br />Never under estimate yr self, just represent yr profile in proper manner.
 
 
subject: JspWriter question
 
Threads others viewed
WA #1.....word association
ResultSet to Array
date format with MS Access database
How to convert byte array into string array?
Tech Word Game
MyEclipse, The Clear Choice