ba_out.writeTo(out);
IOUtilities.close(out);
getCookies(c);
// Get the return value of the call
JsonReader reader;
if (LOG.isDebugEnabled())
{
ByteArrayOutputStream input = new ByteArrayOutputStream(32768);
IOUtilities.transfer(IOUtilities.getInputStream(c), input);
byte[] bytes = input.toByteArray();
String jsonResp = new String(bytes, "UTF-8");
LOG.debug(jsonResp);
reader = new JsonReader(new ByteArrayInputStream(bytes));
}
else
{
reader = new JsonReader(IOUtilities.getInputStream(c));
}
Object[] res = (Object[]) reader.readObject();
// Do we need to close reader? Don't want to stop http keep alives.
reader.close();
Object result = res[0];
checkForThrowable(result);
return result;
}
catch (ThreadDeath e)