Is there a built in function to convert ints to Big-endian or little-endian for sending over the network? like htonl and ntohl in c
Also, is there something similar to strings, datetime, etc..
Thanks
Is there a built in function to convert ints to Big-endian or little-endian for sending over the network? like htonl and ntohl in c
Also, is there something similar to strings, datetime, etc..
Thanks
Hope this helps : http://stackoverflow.com/questions/362384/are-integers-in-java-little-endian-or-big-endian
Java streams use network byte order. That means you only have to worry about things like htonl
and ntohl
in C and it ilk.