Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within OCPJWCD
Search Coderanch
Advance search
Google search
Register / Login
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
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Web Component Certification (OCEJWCD)
PrintWriter vs OutputStream
samdeep aarzoo
Ranch Hand
Posts: 160
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
can anybody help me
what is the difference between PrintWriter and OutputStream
which should we use . which is better?
David Ulicny
Ranch Hand
Posts: 724
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
PrintWriter is only for character data and OutputStream for everything (binary data, character data).
SCJP<br />SCWCD <br />ICSD(286)<br />MCP 70-216
Alexandre Cervieri
Greenhorn
Posts: 27
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
In addition, you cannot use both PrintWriter and OutputStream. If you obtained one of them and try to get the other you will get a
IllegalStateException
. See also the following
thread
:
https://coderanch.com/t/170147/java-Web-Component-SCWCD/certification/servlet-getWriter-output-stream
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Difference between PrintWriter and Output Stream.
problem with PrintWriter
why should we set response.setContentType before using PrintWriter or OutputStream?
what is the difference between printStream and PrintWriter?
PrintStream & PrintWriter
More...