@Override
public ObjectOutput startObjectOutput(OutputStream os, boolean isReentrant, final int estimatedSize) throws IOException {
ObjectOutput out = defaultMarshaller.startObjectOutput(os, isReentrant, estimatedSize);
try {
final int version = VERSION_510;
out.writeShort(version);
if (trace) log.tracef("Wrote version %s", version);
} catch (Exception e) {
finishObjectOutput(out);
log.unableToReadVersionId();
throw new IOException("Unable to read version id from first two bytes of stream : " + e.getMessage());