Converting data from Java to ActionScript |
|
|
Java type |
ActionScript type (AMF 3) |
java.lang.String |
String |
java.lang.Boolean, boolean |
Boolean |
java.lang.Integer |
int |
If i < 0xF0000000 || i > 0x0FFFFFFF, the value is promoted to Number. |
java.lang.Short |
int |
If i < 0xF0000000 || i > 0x0FFFFFFF, the value is promoted to Number. |
java.lang.Byte |
int |
If i < 0xF0000000 || i > 0x0FFFFFFF, the value is promoted to Number. |
java.lang.Byte[] |
flash.utils.ByteArray |
java.lang.Double |
Number |
java.lang.Long |
Number |
java.lang.Float |
Number |
java.lang.Character |
String |
java.lang.Character[] |
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.lang.Object (other than previously listed types) |
Typed Object |
Objects are serialized using Java Bean introspection rules. Fields that are static, transient, or nonpublic are excluded. |
java.util.Collection |
mx.collection.ArrayCollection |
java.lang.Object[] |
Array |
java.util.Map |
Object (untyped) |
In Flex 1.5, java.util.Map was sent as an associative or ECMA Array. This is no longer a recommended practice. You can enable legacy Map support to associative Arrays, but Adobe recommends against doing this. For more information, see Providing legacy AMF serialization on a channel |
java.util.Dictionary |
Object (untyped) |
org.w3c.dom.Document |
XML object |
You can enable legacy XML support for the XMLDocument type on any channel defined in the services-config.xml file. For more information, see Providing legacy AMF serialization on a channel. |
null |
null |
Other classes that extend java.lang.Object |
Object (typed) |
Objects are serialized using Java Bean introspection rules. Fields that are static, transient, or nonpublic are excluded. |
posted on 2007-04-11 13:02
☜♥☞MengChuChen 阅读(954)
评论(1) 编辑 收藏 所属分类:
flex2.0