Hi,

I have a Java class

class util
{
public boolean convert(OutputStream out, InputStream);
}

I don't have access to the Java code, but only to the JAR file.

When I was getting the input and output from a file, this was
okay. Now I get the input from a String, and the output should
also be to a String.

Because convert() takes only streams, I am unable to pass Strings
to it. I can create temp files to get around this, but that would
slow down the process.

Is there a way to convert a String or a StringBuffer to an OutputStream
and InputStream?

Thanks in advance,
Aruna