Newsletter sign-up
View all newsletters

Sign up for our technology specific newsletters.

Enterprise Java
Email Address:

Java Tip 40: Object transport via datagram packets

Transport Java objects over the network with datagram packets

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone

Page 3 of 3

Conclusion

By taking advantage of Java's built-in serialization code, I have illustrated a way to transmit objects with using datagram packets. As we have seen, the trick is to use the byte array stream to "streamize" objects into byte arrays.

About the author

Shengxi (Sunny) Zhou received a Bachelor of Science degree in computer science in 1991 from Shanghai University of Science and Technology. During the past six years, he has worked for several high-tech companies including Hewlett-Packard. Currently he is getting his Master's degree in computer science at the University of New Orleans. He is working with professor Shengru Tu on his thesis, and his recent research focuses on Java's network facilities.
  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Comments (5)
Login
Forgot your account info?

12 Years and no comment that this example never workedBy Anonymous on November 17, 2009, 12:35 amAfter 12 years , no one has actually tried to compile this and comment that it does not work. Where is dSock defined? In the first example, it will not compile...

Reply | Read entire comment

Very helpfulBy Anonymous on October 31, 2009, 4:03 pmThanks this is a very clear article. Good job

Reply | Read entire comment

ThanksBy Anonymous on June 12, 2009, 1:39 amCongratulations Shengxi Zhou. It's a very well written article. It was simple to follow and up to the point. Warm Regards, ghd

Reply | Read entire comment

Thank you very much! I am going to implement the same...By Anonymous on March 23, 2009, 8:59 pmThank you very much! I am going to implement the same. I am sure this must work.

Reply | Read entire comment

thanks heaps for ur helpBy Anonymous on October 5, 2008, 11:55 amthat was avery comprehensive description of how serialisation works in sockets. At many other places they give no idea about serialising using datagram sockets. Thanks...

Reply | Read entire comment

View all comments

Add comment
Anonymous comments subject to approval. Register here for member benefits.
Have a JavaWorld account? Log in here. Register now for a free account.
Resources