Note that there are some explanatory texts on larger screens.

plurals
  1. POJava: how many bytes needed to transmit double data type array containing nulls?
    primarykey
    data
    text
    <p>If I pass an array of data type double having 100 elements (for example) from an application server's (Linux CentOS) Java (1.6) method to a client using a binary transfer (e.g. <a href="http://en.wikipedia.org/wiki/Action_Message_Format" rel="nofollow">AMF protocol</a>), how many bytes are transmitted? </p> <p>For example, if it were an array of double floating-point numbers, each number occupies 8 bytes. So, if the array is 100 elements long, and each element were null, would an array size of 800 bytes be transmitted? That is, does each element still occupy 8 bytes if it is null? </p> <p>UPDATE:</p> <p>Ultimately what I'm getting at with the above question, is I have a (x,y) data set on a server that represents a plot. The y data is unique, but the x-data is equally spaced. So, I can avoid transmitting the x-data from the server to the client (instead transmitting the x-interval and let the client re-create the predictable x-axis values). However, the array being passed from the server to the client appears as:</p> <pre><code>myArray[0].x = null myArray[0].y = 1e-302 myArray[1].x = null myArray[1].y = 1.42e-202 ... myArray[99].x = null myArray[99].y = 2.3234e-3 </code></pre> <p>and I'm wondering if those <code>null</code> values are going to each be 8 bytes long or if I'll get some memory savings because they are <code>null</code>.</p> <p>UPDATE 2:</p> <p>PDF page 82 here for the BlazeDS (e.g. LCDS) <a href="http://help.adobe.com/en_US/LiveCycleDataServicesES/3.1/Developing/lcds31_using.pdf" rel="nofollow">documentation</a> describes conversion from Java to ActionScript AMF3 (used by BlazeDS and LCDS). On PDF page 83 the table shows Java type <code>null</code> maps to ActionScript AMF3 type <code>null</code>. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload