@Override public void write(AMF3Serializer serializer, Object o) throws IOException { serializer.writeAMF3Number(((Number)o).doubleValue()); } };
@Override public void write(AMF3Serializer serializer, Object o) throws IOException { serializer.writeAMF3Number(((Number)o).doubleValue()); } };
@Override public void write(AMF3Serializer serializer, Object o) throws IOException { serializer.writeAMF3Number(((Number)o).doubleValue()); } };
protected void writeAMF3Integer(int i) throws IOException { if (i < AMF3_INTEGER_MIN || i > AMF3_INTEGER_MAX) writeAMF3Number(i); else { ensureCapacity(1); buffer[position++] = AMF3_INTEGER; writeAMF3UnsignedIntegerData(i & AMF3_SIGNED_INTEGER_MASK); } }
protected void writeAMF3Integer(int i) throws IOException { if (i < AMF3_INTEGER_MIN || i > AMF3_INTEGER_MAX) writeAMF3Number(i); else { ensureCapacity(1); buffer[position++] = AMF3_INTEGER; writeAMF3UnsignedIntegerData(i & AMF3_SIGNED_INTEGER_MASK); } }
protected void writeAMF3Integer(int i) throws IOException { if (i < AMF3_INTEGER_MIN || i > AMF3_INTEGER_MAX) writeAMF3Number(i); else { ensureCapacity(1); buffer[position++] = AMF3_INTEGER; writeAMF3UnsignedIntegerData(i & AMF3_SIGNED_INTEGER_MASK); } }
protected void writeAMF3Integer(int i) throws IOException { if (debugMore) logMore.debug("writeAMF3Integer(i=%d)", i); if (i < AMF3_INTEGER_MIN || i > AMF3_INTEGER_MAX) { if (debugMore) logMore.debug("writeAMF3Integer() - %d is out of AMF3 int range, writing it as a Number", i); writeAMF3Number(i); } else { write(AMF3_INTEGER); writeAMF3IntegerData(i); } }
protected void writeAMF3DoubleArray(double[] array) throws IOException { ensureCapacity(1); buffer[position++] = AMF3_ARRAY; int index = storedObjects.putIfAbsent(array); if (index >= 0) writeAMF3UnsignedIntegerData(index << 1); else { writeAMF3UnsignedIntegerData(array.length << 1 | 0x01); ensureCapacity(1); buffer[position++] = 0x01; for (double i : array) writeAMF3Number(i); } }
protected void writeAMF3DoubleArray(double[] array) throws IOException { ensureCapacity(1); buffer[position++] = AMF3_ARRAY; int index = storedObjects.putIfAbsent(array); if (index >= 0) writeAMF3UnsignedIntegerData(index << 1); else { writeAMF3UnsignedIntegerData(array.length << 1 | 0x01); ensureCapacity(1); buffer[position++] = 0x01; for (double i : array) writeAMF3Number(i); } }
protected void writeAMF3LongArray(long[] array) throws IOException { ensureCapacity(1); buffer[position++] = AMF3_ARRAY; int index = storedObjects.putIfAbsent(array); if (index >= 0) writeAMF3UnsignedIntegerData(index << 1); else { writeAMF3UnsignedIntegerData(array.length << 1 | 0x01); ensureCapacity(1); buffer[position++] = 0x01; for (long i : array) writeAMF3Number(i); } }
protected void writeAMF3FloatArray(float[] array) throws IOException { ensureCapacity(1); buffer[position++] = AMF3_ARRAY; int index = storedObjects.putIfAbsent(array); if (index >= 0) writeAMF3UnsignedIntegerData(index << 1); else { writeAMF3UnsignedIntegerData(array.length << 1 | 0x01); ensureCapacity(1); buffer[position++] = 0x01; for (float i : array) writeAMF3Number(i); } }
protected void writeAMF3DoubleArray(double[] array) throws IOException { ensureCapacity(1); buffer[position++] = AMF3_ARRAY; int index = storedObjects.putIfAbsent(array); if (index >= 0) writeAMF3UnsignedIntegerData(index << 1); else { writeAMF3UnsignedIntegerData(array.length << 1 | 0x01); ensureCapacity(1); buffer[position++] = 0x01; for (double i : array) writeAMF3Number(i); } }
protected void writeAMF3FloatArray(float[] array) throws IOException { ensureCapacity(1); buffer[position++] = AMF3_ARRAY; int index = storedObjects.putIfAbsent(array); if (index >= 0) writeAMF3UnsignedIntegerData(index << 1); else { writeAMF3UnsignedIntegerData(array.length << 1 | 0x01); ensureCapacity(1); buffer[position++] = 0x01; for (float i : array) writeAMF3Number(i); } }
protected void writeAMF3LongArray(long[] array) throws IOException { ensureCapacity(1); buffer[position++] = AMF3_ARRAY; int index = storedObjects.putIfAbsent(array); if (index >= 0) writeAMF3UnsignedIntegerData(index << 1); else { writeAMF3UnsignedIntegerData(array.length << 1 | 0x01); ensureCapacity(1); buffer[position++] = 0x01; for (long i : array) writeAMF3Number(i); } }
protected void writeAMF3FloatArray(float[] array) throws IOException { ensureCapacity(1); buffer[position++] = AMF3_ARRAY; int index = storedObjects.putIfAbsent(array); if (index >= 0) writeAMF3UnsignedIntegerData(index << 1); else { writeAMF3UnsignedIntegerData(array.length << 1 | 0x01); ensureCapacity(1); buffer[position++] = 0x01; for (float i : array) writeAMF3Number(i); } }
protected void writeAMF3LongArray(long[] array) throws IOException { ensureCapacity(1); buffer[position++] = AMF3_ARRAY; int index = storedObjects.putIfAbsent(array); if (index >= 0) writeAMF3UnsignedIntegerData(index << 1); else { writeAMF3UnsignedIntegerData(array.length << 1 | 0x01); ensureCapacity(1); buffer[position++] = 0x01; for (long i : array) writeAMF3Number(i); } }
writeAMF3Object(o); else writeAMF3Number(((Number)o).doubleValue());