Class Index | File Index

Classes


Built-In Namespace Array

Method Summary
Method Attributes Method Name and Description
 
toJava(type)
Converts a JavaScript Array object into a Java array of the named type.
Method Detail
toJava(type)
Converts a JavaScript Array object into a Java array of the named type. This routine converts a JavaScript Array into a particular type of Java array. For example, this is the only way to create a byte[] array commonly used for e.g. IP addresses.

Example:

var JSArray = [ 012, 000, 000, 0147 ];
var JavaArray = JSArray.toJava(Byte);
var hostname = java.net.InetAddress.getByAddress(JavaArray);

Defined in: utils.js.
Parameters:
{Object[]} type
The type of Java array to create

©2008
Documentation generated by JsDoc Toolkit 2.0.2 on Thu Oct 07 2010 07:23:17 GMT-0400 (EDT)