/** Writes an object using the specified serializer. The registered serializer is ignored. */ public void writeObject (Output output, Object object, Serializer serializer) { if (output == null) throw new IllegalArgumentException("output cannot be null."); if (object == null) throw new IllegalArgumentException("object cannot be null."); if (serializer == null) throw new IllegalArgumentException("serializer cannot be null."); beginObject(); try { if (references && writeReferenceOrNull(output, object, false)) { serializer.setGenerics(this, null); return; } if (TRACE || (DEBUG && depth == 1)) log("Write", object); serializer.write(this, output, object); } finally { if (--depth == 0 && autoReset) reset(); } }
/** Writes an object using the specified serializer. The registered serializer is ignored. */ public void writeObject (Output output, Object object, Serializer serializer) { if (output == null) throw new IllegalArgumentException("output cannot be null."); if (object == null) throw new IllegalArgumentException("object cannot be null."); if (serializer == null) throw new IllegalArgumentException("serializer cannot be null."); beginObject(); try { if (references && writeReferenceOrNull(output, object, false)) { serializer.setGenerics(this, null); return; } if (TRACE || (DEBUG && depth == 1)) log("Write", object); serializer.write(this, output, object); } finally { if (--depth == 0 && autoReset) reset(); } }
/** Writes an object using the specified serializer. The registered serializer is ignored. */ public void writeObject (Output output, Object object, Serializer serializer) { if (output == null) throw new IllegalArgumentException("output cannot be null."); if (object == null) throw new IllegalArgumentException("object cannot be null."); if (serializer == null) throw new IllegalArgumentException("serializer cannot be null."); beginObject(); try { if (references && writeReferenceOrNull(output, object, false)) { serializer.setGenerics(this, null); return; } if (TRACE || (DEBUG && depth == 1)) log("Write", object); serializer.write(this, output, object); } finally { if (--depth == 0 && autoReset) reset(); } }
/** Writes an object using the specified serializer. The registered serializer is ignored. */ public void writeObject (Output output, Object object, Serializer serializer) { if (output == null) throw new IllegalArgumentException("output cannot be null."); if (object == null) throw new IllegalArgumentException("object cannot be null."); if (serializer == null) throw new IllegalArgumentException("serializer cannot be null."); beginObject(); try { if (references && writeReferenceOrNull(output, object, false)) { serializer.setGenerics(this, null); return; } if (TRACE || (DEBUG && depth == 1)) log("Write", object); serializer.write(this, output, object); } finally { if (--depth == 0 && autoReset) reset(); } }
/** Writes an object using the registered serializer. */ public void writeObject (Output output, Object object) { if (output == null) throw new IllegalArgumentException("output cannot be null."); if (object == null) throw new IllegalArgumentException("object cannot be null."); beginObject(); try { if (references && writeReferenceOrNull(output, object, false)) { getRegistration(object.getClass()).getSerializer().setGenerics(this, null); return; } if (TRACE || (DEBUG && depth == 1)) log("Write", object); getRegistration(object.getClass()).getSerializer().write(this, output, object); } finally { if (--depth == 0 && autoReset) reset(); } }
/** Writes an object using the registered serializer. */ public void writeObject (Output output, Object object) { if (output == null) throw new IllegalArgumentException("output cannot be null."); if (object == null) throw new IllegalArgumentException("object cannot be null."); beginObject(); try { if (references && writeReferenceOrNull(output, object, false)) { getRegistration(object.getClass()).getSerializer().setGenerics(this, null); return; } if (TRACE || (DEBUG && depth == 1)) log("Write", object); getRegistration(object.getClass()).getSerializer().write(this, output, object); } finally { if (--depth == 0 && autoReset) reset(); } }
/** Writes an object using the registered serializer. */ public void writeObject (Output output, Object object) { if (output == null) throw new IllegalArgumentException("output cannot be null."); if (object == null) throw new IllegalArgumentException("object cannot be null."); beginObject(); try { if (references && writeReferenceOrNull(output, object, false)) { getRegistration(object.getClass()).getSerializer().setGenerics(this, null); return; } if (TRACE || (DEBUG && depth == 1)) log("Write", object); getRegistration(object.getClass()).getSerializer().write(this, output, object); } finally { if (--depth == 0 && autoReset) reset(); } }
/** Writes an object using the registered serializer. */ public void writeObject (Output output, Object object) { if (output == null) throw new IllegalArgumentException("output cannot be null."); if (object == null) throw new IllegalArgumentException("object cannot be null."); beginObject(); try { if (references && writeReferenceOrNull(output, object, false)) { getRegistration(object.getClass()).getSerializer().setGenerics(this, null); return; } if (TRACE || (DEBUG && depth == 1)) log("Write", object); getRegistration(object.getClass()).getSerializer().write(this, output, object); } finally { if (--depth == 0 && autoReset) reset(); } }
/** Writes the class and object or null using the registered serializer. * @param object May be null. */ public void writeClassAndObject (Output output, Object object) { if (output == null) throw new IllegalArgumentException("output cannot be null."); beginObject(); try { if (object == null) { writeClass(output, null); return; } Registration registration = writeClass(output, object.getClass()); if (references && writeReferenceOrNull(output, object, false)) { registration.getSerializer().setGenerics(this, null); return; } if (TRACE || (DEBUG && depth == 1)) log("Write", object); registration.getSerializer().write(this, output, object); } finally { if (--depth == 0 && autoReset) reset(); } }
/** Writes the class and object or null using the registered serializer. * @param object May be null. */ public void writeClassAndObject (Output output, Object object) { if (output == null) throw new IllegalArgumentException("output cannot be null."); beginObject(); try { if (object == null) { writeClass(output, null); return; } Registration registration = writeClass(output, object.getClass()); if (references && writeReferenceOrNull(output, object, false)) { registration.getSerializer().setGenerics(this, null); return; } if (TRACE || (DEBUG && depth == 1)) log("Write", object); registration.getSerializer().write(this, output, object); } finally { if (--depth == 0 && autoReset) reset(); } }
/** Writes the class and object or null using the registered serializer. * @param object May be null. */ public void writeClassAndObject (Output output, Object object) { if (output == null) throw new IllegalArgumentException("output cannot be null."); beginObject(); try { if (object == null) { writeClass(output, null); return; } Registration registration = writeClass(output, object.getClass()); if (references && writeReferenceOrNull(output, object, false)) { registration.getSerializer().setGenerics(this, null); return; } if (TRACE || (DEBUG && depth == 1)) log("Write", object); registration.getSerializer().write(this, output, object); } finally { if (--depth == 0 && autoReset) reset(); } }
/** Writes the class and object or null using the registered serializer. * @param object May be null. */ public void writeClassAndObject (Output output, Object object) { if (output == null) throw new IllegalArgumentException("output cannot be null."); beginObject(); try { if (object == null) { writeClass(output, null); return; } Registration registration = writeClass(output, object.getClass()); if (references && writeReferenceOrNull(output, object, false)) { registration.getSerializer().setGenerics(this, null); return; } if (TRACE || (DEBUG && depth == 1)) log("Write", object); registration.getSerializer().write(this, output, object); } finally { if (--depth == 0 && autoReset) reset(); } }
/** Writes an object or null using the specified serializer. The registered serializer is ignored. * @param object May be null. */ public void writeObjectOrNull (Output output, Object object, Serializer serializer) { if (output == null) throw new IllegalArgumentException("output cannot be null."); if (serializer == null) throw new IllegalArgumentException("serializer cannot be null."); beginObject(); try { if (references) { if (writeReferenceOrNull(output, object, true)) { serializer.setGenerics(this, null); return; } } else if (!serializer.getAcceptsNull()) { if (object == null) { if (TRACE || (DEBUG && depth == 1)) log("Write", null); output.writeByte(NULL); return; } output.writeByte(NOT_NULL); } if (TRACE || (DEBUG && depth == 1)) log("Write", object); serializer.write(this, output, object); } finally { if (--depth == 0 && autoReset) reset(); } }
/** Writes an object or null using the specified serializer. The registered serializer is ignored. * @param object May be null. */ public void writeObjectOrNull (Output output, Object object, Serializer serializer) { if (output == null) throw new IllegalArgumentException("output cannot be null."); if (serializer == null) throw new IllegalArgumentException("serializer cannot be null."); beginObject(); try { if (references) { if (writeReferenceOrNull(output, object, true)) { serializer.setGenerics(this, null); return; } } else if (!serializer.getAcceptsNull()) { if (object == null) { if (TRACE || (DEBUG && depth == 1)) log("Write", null); output.writeByte(NULL); return; } output.writeByte(NOT_NULL); } if (TRACE || (DEBUG && depth == 1)) log("Write", object); serializer.write(this, output, object); } finally { if (--depth == 0 && autoReset) reset(); } }
/** Writes an object or null using the specified serializer. The registered serializer is ignored. * @param object May be null. */ public void writeObjectOrNull (Output output, Object object, Serializer serializer) { if (output == null) throw new IllegalArgumentException("output cannot be null."); if (serializer == null) throw new IllegalArgumentException("serializer cannot be null."); beginObject(); try { if (references) { if (writeReferenceOrNull(output, object, true)) { serializer.setGenerics(this, null); return; } } else if (!serializer.getAcceptsNull()) { if (object == null) { if (TRACE || (DEBUG && depth == 1)) log("Write", null); output.writeByte(NULL); return; } output.writeByte(NOT_NULL); } if (TRACE || (DEBUG && depth == 1)) log("Write", object); serializer.write(this, output, object); } finally { if (--depth == 0 && autoReset) reset(); } }
/** Writes an object or null using the specified serializer. The registered serializer is ignored. * @param object May be null. */ public void writeObjectOrNull (Output output, Object object, Serializer serializer) { if (output == null) throw new IllegalArgumentException("output cannot be null."); if (serializer == null) throw new IllegalArgumentException("serializer cannot be null."); beginObject(); try { if (references) { if (writeReferenceOrNull(output, object, true)) { serializer.setGenerics(this, null); return; } } else if (!serializer.getAcceptsNull()) { if (object == null) { if (TRACE || (DEBUG && depth == 1)) log("Write", null); output.writeByte(NULL); return; } output.writeByte(NOT_NULL); } if (TRACE || (DEBUG && depth == 1)) log("Write", object); serializer.write(this, output, object); } finally { if (--depth == 0 && autoReset) reset(); } }
/** Writes an object or null using the registered serializer for the specified type. * @param object May be null. */ public void writeObjectOrNull (Output output, Object object, Class type) { if (output == null) throw new IllegalArgumentException("output cannot be null."); beginObject(); try { Serializer serializer = getRegistration(type).getSerializer(); if (references) { if (writeReferenceOrNull(output, object, true)) { serializer.setGenerics(this, null); return; } } else if (!serializer.getAcceptsNull()) { if (object == null) { if (TRACE || (DEBUG && depth == 1)) log("Write", object); output.writeByte(NULL); return; } output.writeByte(NOT_NULL); } if (TRACE || (DEBUG && depth == 1)) log("Write", object); serializer.write(this, output, object); } finally { if (--depth == 0 && autoReset) reset(); } }
/** Writes an object or null using the registered serializer for the specified type. * @param object May be null. */ public void writeObjectOrNull (Output output, Object object, Class type) { if (output == null) throw new IllegalArgumentException("output cannot be null."); beginObject(); try { Serializer serializer = getRegistration(type).getSerializer(); if (references) { if (writeReferenceOrNull(output, object, true)) { serializer.setGenerics(this, null); return; } } else if (!serializer.getAcceptsNull()) { if (object == null) { if (TRACE || (DEBUG && depth == 1)) log("Write", object); output.writeByte(NULL); return; } output.writeByte(NOT_NULL); } if (TRACE || (DEBUG && depth == 1)) log("Write", object); serializer.write(this, output, object); } finally { if (--depth == 0 && autoReset) reset(); } }
/** Writes an object or null using the registered serializer for the specified type. * @param object May be null. */ public void writeObjectOrNull (Output output, Object object, Class type) { if (output == null) throw new IllegalArgumentException("output cannot be null."); beginObject(); try { Serializer serializer = getRegistration(type).getSerializer(); if (references) { if (writeReferenceOrNull(output, object, true)) { serializer.setGenerics(this, null); return; } } else if (!serializer.getAcceptsNull()) { if (object == null) { if (TRACE || (DEBUG && depth == 1)) log("Write", object); output.writeByte(NULL); return; } output.writeByte(NOT_NULL); } if (TRACE || (DEBUG && depth == 1)) log("Write", object); serializer.write(this, output, object); } finally { if (--depth == 0 && autoReset) reset(); } }
/** Writes an object or null using the registered serializer for the specified type. * @param object May be null. */ public void writeObjectOrNull (Output output, Object object, Class type) { if (output == null) throw new IllegalArgumentException("output cannot be null."); beginObject(); try { Serializer serializer = getRegistration(type).getSerializer(); if (references) { if (writeReferenceOrNull(output, object, true)) { serializer.setGenerics(this, null); return; } } else if (!serializer.getAcceptsNull()) { if (object == null) { if (TRACE || (DEBUG && depth == 1)) log("Write", object); output.writeByte(NULL); return; } output.writeByte(NOT_NULL); } if (TRACE || (DEBUG && depth == 1)) log("Write", object); serializer.write(this, output, object); } finally { if (--depth == 0 && autoReset) reset(); } }