TLTEO
asked on
convert string to inputstream
I have a String =" abcdefghij ......"
How can I put into an InputStream.
How can I put into an InputStream.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
According jdk docs,
StringBufferInputStream class does not properly convert characters into bytes. As of JDK 1.1, the preferred way to create a stream from a string is via the StringReader class.
StringBufferInputStream class does not properly convert characters into bytes. As of JDK 1.1, the preferred way to create a stream from a string is via the StringReader class.
ASKER
tks vm . Cheers
ASKER
wrong I am getting error
found : java.io.StringReader
required: java.io.InputStream
InputStream certfis=new StringReader(strdata);
^
cud you pls verify
found : java.io.StringReader
required: java.io.InputStream
InputStream certfis=new StringReader(strdata);
^
cud you pls verify
ASKER
is deprecated.
What is the new way ??