} else {
output = new org.red5.io.amf3.Output(buf);
}
for (IRemotingHeader header : headers) {
Output.putString(buf, IRemotingHeader.PERSISTENT_HEADER);
output.writeBoolean(false);
Map<String, Object> param = new HashMap<String, Object>();
param.put("name", header.getName());
param.put("mustUnderstand", header.getMustUnderstand() ? Boolean.TRUE : Boolean.FALSE);
param.put("data", header.getValue());
Serializer.serialize(output, param);