Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8515809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:14:55+00:00 2026-06-11T05:14:55+00:00

If I pass an array of data type double having 100 elements (for example)

  • 0

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. AMF protocol), how many bytes are transmitted?

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?

UPDATE:

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:

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

and I’m wondering if those null values are going to each be 8 bytes long or if I’ll get some memory savings because they are null.

UPDATE 2:

PDF page 82 here for the BlazeDS (e.g. LCDS) documentation describes conversion from Java to ActionScript AMF3 (used by BlazeDS and LCDS). On PDF page 83 the table shows Java type null maps to ActionScript AMF3 type null.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T05:14:57+00:00Added an answer on June 11, 2026 at 5:14 am

    In AMF0, according to the Wikipedia article you linked to, a “number” (AMF0’s only numeric type, but it corresponds to Java’s double) will be nine bytes (0x00 to indicate it’s a number, plus eight bytes for the number’s double-precision floating-point representation), whereas a null will be just one byte (0x05). An array contains two bytes (initial 0x08 and final 0x09) plus its contents, so if the array has length n, and k of its elements are numbers, then its total size will be 2 + 9 × k + (n − k) = 2 + n + 8 × k. As you can see, nulls can potentially reduce the transmission payload significantly.

    AMF3 differs in details, but is similar.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How to pass an array into a SQL Server stored procedure? For example, I
I am using Codeigniter to pass an array of data from a controller into
I need to pass an array from C#.net application to oracle stored procedure. Can
I came across this post pass array to method Java on how to pass
I want to pass an array of objects from my QtScript to C++ but
I'm trying to pass an array of ( varchar ) data into an Oracle
I want to pass numpy array of known size and type via SWIG to
I use JSON.stringify method to pass an array to server. I have an array
im trying to pass an array of data to a PHP script using Jquery's
I am trying to pass on an array from a function on one sheet

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.