*/
private void writeResponse(HttpServletResponse res, String actionType, Object obj) throws IOException {
//this.initialGlobal.getLog("servlet").trace("AppletServlet", "writeResponse actionType=" + actionType + " obj=" + obj.getClass().getName());
ByteArrayOutputStream dump = new ByteArrayOutputStream(1024);
ObjectOutputStreamMicro objectOut = new ObjectOutputStreamMicro(dump);
objectOut.writeObject(actionType); // "subscribe" etc.
if (obj != null) {
objectOut.writeObject(obj);
}
boolean isChunked = false; // All in one line
String base64 = Base64.encode(dump.toByteArray());