Java Datatype Conversion
Java, unlike ActionScript 1.0, is a typed language. The Flash gateway on the server takes care of the datatype conversions back and forth between the Flash client and the Java server. Table A-3 shows the conversion from Flash ActionScript to Java. Refer also to the ASTranslator library, as discussed in Chapter 7. Chapter 7 also discusses intimate details of datatype conversion from ActionScript to Java and vice versa.
|
Flash (ActionScript) |
Java |
|
ActionScript object |
flashgateway.IO.ASObject (implements java.util.map) |
|
Array (indexed) |
ArrayList |
|
Array (associative) |
java.util.map |
|
Boolean |
Boolean |
|
Date Object |
Date |
|
Number |
Number |
|
RecordSet |
- |
|
String |
String |
|
Undefined |
Null |
|
XML Object |
org.w3c.dom document |
|
Null |
Null |
Table A-4 shows the conversion from Java to Flash ActionScript.
|
Java |
Flash (ActionScript) |
|
Struct |
Associative array |
|
Java object (flashgateway.IO.ASObject) |
ActionScript object |
|
Java object (flashgateway.IO.ASObject with |
ActionScript object of that type |
|
Collection, Object[], array of primitive types |
Array (indexed) |
|
java.util.map |
Array (associative) |
|
Boolean |
Boolean |
|
Date |
Date object |
|
Number |
Number |
|
disconnected RowSet[2] |
RecordSet |
|
flashgateway.sql.PageableResultSet[2] |
pageable RecordSet |
|
String |
String |
|
org.w3c.dom document |
XML object |
|
flashgateway.io.ASXMLString |
XML object |
|
Null |
Null |
[2] Only with Flash Remoting ... | |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access