File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes io package Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "io package" Watch "io package" New topic

io package

Ram Jonnalagadda

Joined: Nov 05, 2000
Posts: 6
I have a doubt.
Can we pass StringBuffer as an argument to streams.
prasanthi kothapa
Ranch Hand

Joined: Oct 19, 2000
Posts: 30
ji ram,
no i don't think you could possibly pass a StingBuffer as
an argument.if i am wrong please correct me.

sarim raza
Ranch Hand

Joined: Nov 02, 2000
Posts: 232
higher order streams would not take string buffer as an argument, they are particular about what they take as an argument, and normally take lower order streams, like a bufferedinputstream would take a fileinputstream
Ram Jonnalagadda

Joined: Nov 05, 2000
Posts: 6
That's a good explanation.
Paul Anilprem
Enthuware Software Support
Ranch Hand

Joined: Sep 23, 2000
Posts: 3635
It is not clear what do you mean by passing StringBuffer as an argument. If you mean passing StringBuffer to constructor for creating streams then, there are two classes StringBufferInputStream (Deprecated) and StringReader. But both of them take String as an argument.

Get Certified, Guaranteed!
(Now Revised for the new Pattern)

Enthuware - Best Mock Exams and Questions for Oracle Java Certifications
Quality Guaranteed - Pass or Full Refund!
I agree. Here's the link:
subject: io package
It's not a secret anymore!