• Post Reply Bookmark Topic Watch Topic
  • New Topic

read/write short datatype between C and java  RSS feed

 
R.Joe
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can we read short datatype in java which was write in C?
I am sending two byte(one short) from C and read that two byte(one short) in java, but i am not able to read that byte
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In what format was it written? Into a file or where? How are you trying to read it? Maybe you're running into little-endian/big-endian issues?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!