@Override public void writeObject(Object o) throws IOException { if (o != null) o = converters.revert(o); if (o == null) writeAMF3Null(); else { Class<?> cls = o.getClass(); if (cls == String.class) { writeAMF3String((String)o); return; } if (cls == Integer.class) { writeAMF3Integer(((Integer)o).intValue()); return; } if (cls == Boolean.class) { writeAMF3Boolean(((Boolean)o).booleanValue()); return; } AMF3Writer writer = writersCache.get(cls); if (writer == null) { writer = getWriter(cls); writersCache.put(cls, writer); } writer.write(this, o); } }
@Override public void writeObject(Object o) throws IOException { if (o != null) o = converters.revert(o); if (o == null) writeAMF3Null(); else { Class<?> cls = o.getClass(); if (cls == String.class) { writeAMF3String((String)o); return; } if (cls == Integer.class) { writeAMF3Integer(((Integer)o).intValue()); return; } if (cls == Boolean.class) { writeAMF3Boolean(((Boolean)o).booleanValue()); return; } AMF3Writer writer = writersCache.get(cls); if (writer == null) { writer = getWriter(cls); writersCache.put(cls, writer); } writer.write(this, o); } }
@Override public void writeObject(Object o) throws IOException { if (o != null) o = converters.revert(o); if (o == null) writeAMF3Null(); else { Class<?> cls = o.getClass(); if (cls == String.class) { writeAMF3String((String)o); return; } if (cls == Integer.class) { writeAMF3Integer(((Integer)o).intValue()); return; } if (cls == Boolean.class) { writeAMF3Boolean(((Boolean)o).booleanValue()); return; } AMF3Writer writer = writersCache.get(cls); if (writer == null) { writer = getWriter(cls); writersCache.put(cls, writer); } writer.write(this, o); } }