BlazeDS data type mapping (Java to ActionScript)
Converting data from Java to ActionScript
An object returned from a Java method is converted from Java to ActionScript. BlazeDS also handles objects found within objects. BlazeDS implicitly handles the Java data types in the following table.
Java type |
ActionScript type (AMF 3) |
---|---|
enum (JDK 1.5) |
String |
java.lang.String |
String |
java.lang.Boolean, boolean |
Boolean |
java.lang.Integer, int |
int If value < 0xF0000000 || value > 0x0FFFFFFF, the value is promoted to Number due to AMF encoding requirements. |
java.lang.Short, short |
int If i < 0xF0000000 || i > 0x0FFFFFFF, the value is promoted to Number. |
java.lang.Byte, byte[] |
int If i < 0xF0000000 || i > 0x0FFFFFFF, the value is promoted to Number. |
java.lang.Byte[] |
flash.utils.ByteArray |
java.lang.Double, double |
Number |
java.lang.Long, long |
Number |
java.lang.Float, float |
Number |
java.lang.Character, char |
String |
java.lang.Character[], char[] |
String |
java. math.BigInteger |
String |
java.math.BigDecimal |
String |
java.util.Calendar |
Date Dates are sent in the Coordinated Universal Time (UTC) time zone. Clients and servers must adjust time accordingly for time zones. |
java.util.Date |
Date Dates are sent in the UTC time zone. Clients and servers must adjust time accordingly for time zones. |
java.util.Collection (for example, java.util.ArrayList) |
mx.collections.ArrayCollection |
java.lang.Object[] |
Array |
java.util.Map |
Object (untyped). For example, a java.util.Map[] is converted to an Array (of Objects). |
java.util.Dictionary |
Object (untyped) |
org.w3c.dom.Document |
XML object |
null |
null |
java.lang.Object (other than previously listed types) |
Typed Object Objects are serialized using Java bean introspection rules and also include public fields. Fields that are static, transient, or nonpublic, as well as bean properties that are nonpublic or static, are excluded. |