private void writeJavaBinResponse(NamedList<Object> obj, RestChannel channel) {
ByteArrayOutputStream bo = new ByteArrayOutputStream();
// try to marshal the data
try {
new JavaBinCodec().marshal(obj, bo);
} catch (IOException e) {
logger.error("Error writing JavaBin response", e);
}
// send the response