public class IoUtil extends Object
Modifier and Type | Method and Description |
---|---|
static void |
streamResponseAndClose(Writer pWriter,
JSONStreamAware pJson,
String callback)
Stream a JSON stream to a given writer, potentiall wrap it in a callback for a
JSONP response and then flush & close the writer.
|
public static void streamResponseAndClose(Writer pWriter, JSONStreamAware pJson, String callback) throws IOException
pWriter
- writer to write to. Must be not null.pJson
- JSON response to streamcallback
- the name of the callback function if JSONP should be used or null
if the answer should be streamed directlyIOException
- if the streaming failsCopyright © 2021. All rights reserved.