Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Write Methods in OutputStream Class

807605Jul 12 2007 — edited Jul 26 2007
The "Write" methods in the OutputStream class accept only arrays of type byte or int. I would however like to send other types such as String. Any idea how I can do that?
I was told that maybe I could cast using wrapper classes but I'm not sure how it can be done.

Also, Is there any way that I could use ArrayLists, etc to send data instead of an Array? I tried, it didn't work but I thought maybe there's a way to go around it.

Your help is very much appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 23 2007
Added on Jul 12 2007
12 comments
289 views