Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Convert Object to byte array and array size should be 40

 
Srikanth Nakka
Greenhorn
Posts: 26
Eclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



i want to convert above class to byte array and array size should be 40

please help me on how to convert class to byte array and size should be 40

 
Henry Wong
author
Marshal
Pie
Posts: 21193
81
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at the java.nio.ByteBuffer class. Just wrap a byte array, and put everything from your class into it.

Henry
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic