I am trying to convert StreamingOutput to string in Java to pass it to another method. It produces the string but it raises the following error later on.
JAXRSUtils logMessageHandlerProblem Severe: Problem with writing the data, ContentType: text/plain
What's happening?
StreamingOutput stream = method1();
ByteArrayOutputStream output = new ByteArrayOutputStream();
stream.write(output);
String string = new String(output.toString("UTF-8"));
...
public StreamingOutput method1(...){..}
`
stream. SoStreamingOutput stream = new StreamingOutput();