protected void writeAMF3CharArray(char[] array) throws IOException { writeAMF3String(new String(array)); }
@Override public void write(AMF3Serializer serializer, Object o) throws IOException { serializer.writeAMF3String(o.toString()); } };
@Override public void write(AMF3Serializer serializer, Object o) throws IOException { serializer.writeAMF3String(o.toString()); } };
@Override public void write(AMF3Serializer serializer, Object o) throws IOException { serializer.writeAMF3String(o.toString()); } };
protected void writeAMF3CharObjectArray(Character[] array) throws IOException { final int length = array.length; char[] chars = new char[length]; for (int i = 0; i < length; i++) { Character c = array[i]; if (c == null) chars[i] = 0; else chars[i] = c.charValue(); } writeAMF3String(new String(chars)); }
protected void writeAMF3CharArray(char[] array) throws IOException { writeAMF3String(new String(array)); }
protected void writeAMF3CharArray(char[] array) throws IOException { writeAMF3String(new String(array)); }
protected void writeAMF3CharObjectArray(Character[] array) throws IOException { final int length = array.length; char[] chars = new char[length]; for (int i = 0; i < length; i++) { Character c = array[i]; if (c == null) chars[i] = 0; else chars[i] = c.charValue(); } writeAMF3String(new String(chars)); }
protected void writeAMF3CharObjectArray(Character[] array) throws IOException { final int length = array.length; char[] chars = new char[length]; for (int i = 0; i < length; i++) { Character c = array[i]; if (c == null) chars[i] = 0; else chars[i] = c.charValue(); } writeAMF3String(new String(chars)); }
@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); } }
write(AMF3_NULL); else if (o instanceof String || o instanceof Character) writeAMF3String(o.toString()); else if (o instanceof Boolean) write(((Boolean)o).booleanValue() ? AMF3_BOOLEAN_TRUE : AMF3_BOOLEAN_FALSE);