Link to home
Start Free TrialLog in
Avatar of richardluo
richardluo

asked on

How to convert a OutputStreamWriter to FileOutputStream/OutputStream ?

Hi,

  I have an OutputStreamWriter object, I need to convert this object to a FileOutputStream(or OutputStream) object, so I can pass the this object to Properties.store method.

Someone knows how to do it ?

Thanks

Richard

Avatar of Sendoh
Sendoh
Flag of New Zealand image

hi !
just wondering in order for u to create a OutputStreamWriter obj(y) u need a OutputStream obj(x) ...
so just store and pass that x to properties.store loh...

hope this helps...:)
Avatar of richardluo
richardluo

ASKER

Hi,

  I need to create an OutputStream with encoding, OutputStream object itself doesn't allow u to put encoding, so I need to create OutputStreamWriter with encoding first, then pass that object to store...

Any suggestion ?

Richard
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Richard
U can use DataOutputStream and save in specified format.



Cheers
Shyam
Just checkup the Document for DataOutputStream


Cheers
Shyam