0

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

clarity
  • 421
  • 1
  • 8
  • 19

1 Answers1

1

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
  • 5,684
  • 21
  • 25
  • Unless you want to interoperate with a protocol that specifies a byte order other than NBO. – caf Aug 18 '10 at 23:27