I am using a 64bit Mac and I am sure that Java (1.6 in my case) uses big-endians.
I am trying to connect to my java server from my iPhone in Objective C. Is the iPhone (target C) small or large endian?
If it uses a little endian, how can I convert the size of NSData * to bigEndian so that Java can read it correctly?
int s = [protoToSend serializedSize]; NSData *size = [NSData dataWithBytes:&s length:1];
Thank you in advance
source share