Wire Protocol for Arrays
We need to first indicate the type of the array that we will be packing. The following is a list for the all possible types of arrays that are valid:
typeByte:
- 10 boolean array
- 11 byte array
- 12 short array
- 13 int array
- 14 long array
- 15 float array
- 16 double array
- 17 char array
- 18 array of references (HPCxx_String, Objects, ...)
case1: if typeByte is not 18
- typebyte // this indicates the type of the array
- int numberOfElements // this indicates the number of objects of the type that will follow
- Call pack on each element of the array // each element needs to be packed
case2: if typeByte is 18
- byte 18 // this indicates that an array of references is being packed
- FQN // Fully Qualfied Name of the object
- int numberOfElements // this indicates the number of objects of the type that will follow
- Call pack on each element of the array // each element needs to be packed
Note: The FQN for non primitive arrays is the class of the *elements* of the array.
Back to HPC++2NexusRMI
HPC++ Webmaster
Last modified: Thu Feb 11 18:04:47 EST 1999