J
John English
I want to use a method that takes an InputStream parameter and supply
it with data that's stored in a String. I can easily do this using a
StringBufferInputStream, but the compiler moans at me that this class
is deprecated and the API spec says I should use StringReader instead.
However, I can't find any way of turning a StringReader into an
InputStream so that I can use it as a parameter for the method I
need to use. I'm still using the deprecated StringBufferInputStream
since I can't find any other way to do it.
Surely there must be a way to do this using a StringReader, or what's
the point of deprecating StringBufferInputStream? Aaargh!
Any help much appreciated,
-----------------------------------------------------------------
John English | mailto:[email protected]
Senior Lecturer | http://www.it.bton.ac.uk/staff/je
School of Computing & MIS | ** NON-PROFIT CD FOR CS STUDENTS **
University of Brighton | -- see http://burks.bton.ac.uk
-----------------------------------------------------------------
it with data that's stored in a String. I can easily do this using a
StringBufferInputStream, but the compiler moans at me that this class
is deprecated and the API spec says I should use StringReader instead.
However, I can't find any way of turning a StringReader into an
InputStream so that I can use it as a parameter for the method I
need to use. I'm still using the deprecated StringBufferInputStream
since I can't find any other way to do it.
Surely there must be a way to do this using a StringReader, or what's
the point of deprecating StringBufferInputStream? Aaargh!
Any help much appreciated,
-----------------------------------------------------------------
John English | mailto:[email protected]
Senior Lecturer | http://www.it.bton.ac.uk/staff/je
School of Computing & MIS | ** NON-PROFIT CD FOR CS STUDENTS **
University of Brighton | -- see http://burks.bton.ac.uk
-----------------------------------------------------------------