tags:

views:

53

answers:

2

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

+1  A: 

Java streams use network byte order. That means you only have to worry about things like htonl and ntohl in C and it ilk.

torak
Unless you want to interoperate with a protocol that specifies a byte order other than NBO.
caf