This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Convert Object to byte array and array size should be 40  RSS feed

 
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
Sheriff
Posts: 22818
119
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!