• Post Reply Bookmark Topic Watch Topic
  • New Topic

Vector Serialization

 
Erick Smith
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been having a terrible time with serializing Vectors. I can't seem to get them to update consistently.
Here's my scenario: I send a vector from a client applet to a server application via an objectstream on a socket. I send a vector every couple of seconds that consists of a list of integer arrays (int[]). Now the problem is, that the information contained in the arrays doesn't seem to get serialized unless the actual structure of the Vector is changed (i.e. add or remove an element). What I want is to be able to change some of the values of the integer arrays, serialize the vector that contains all the arrays, and update the whole list on the server side, but the values seem to stay the same even when the client has changed the data! When the vector structure changes, poof, all the new values are correct on the server side, but only that once. No values will change until the structure changes again.
Can anyone help me to figure out how to properly serialize vectors so the internal data gets updated? I've tried everything I can think of, but nothing seems to work.
 
Dave Soto
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out this post, seems like both you guys are having the same problem:
http://www.javaranch.com/ubb/Forum11/HTML/001563.html
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!