harmmeijer
Programmer
Ok so StringBufferInputStream has been deprecated and according to the following url you should use StringReader.
My problem is that I need to convert a string into an InputStream not a Reader, I can parse the InputStream to (for example) SAXParser.parse.
This method does not take a Reader as a parameter.
Reader and InputStream are inconvertible types.
So how do I use StringReader to create an InputStream from a String?
At the moment I use new ByteArrayInputStream to create an InputStream from a String:
new ByteArrayInputStream(myString.getBytes())
Greetings, Harm Meijer
My problem is that I need to convert a string into an InputStream not a Reader, I can parse the InputStream to (for example) SAXParser.parse.
This method does not take a Reader as a parameter.
Reader and InputStream are inconvertible types.
So how do I use StringReader to create an InputStream from a String?
At the moment I use new ByteArrayInputStream to create an InputStream from a String:
new ByteArrayInputStream(myString.getBytes())
Greetings, Harm Meijer