case AMF0_TYPEDOBJECT_TYPE:
String typeName = readUTF();
try {
value = readObjectValue(typeName);
} catch (Exception e1) {
throw new DeserializeException("Failed to deserialised.", e1);
}
break;
case AMF0_LONGSTRING_TYPE:
value = readLongUTF();
break;
case AMF0_OBJECT_TYPE:
try {
value = readObjectValue(null);
} catch (Exception e1) {
throw new DeserializeException("Failed to deserialised.", e1);
}
break;
case AMF0_DATE_TYPE:
long time = (long) readDouble();
readShort(); // consume timezone. Always UTC
value = new Date(time);
break;
case AMF0_ECMAARRAY_TYPE:
value = readECMAArrayValue();
break;
case AMF0_REFERENCE_TYPE:
int refNum = readUnsignedShort();
value = getObject(refNum);
break;
case AMF0_NULL_TYPE:
case AMF0_UNDEFINED_TYPE:
break;
default:
DeserializeException e = new DeserializeException("Can't deserialize type: " + type);
throw e;
}
return value;
}