- * This method detects the endian-ness of the platform by
- * casting a pointer to a word to a pointer to a byte. On
- * big endian platforms the FF will be in the byte with the
- * lowest address. On little endian platforms, the FF will
- * be in the byte with the highest address.
- *
- * @return true if the platform is big endian
- *
- * @draft ICU 2.2
- */
- static le_bool isBigEndian()
- {
- const le_uint16 word = 0xFF00;
-
- return *((le_uint8 *) &word);
- };
-
- /**
- * This method does the byte swap required on little endian platforms
- * to correctly access a (16-bit) word.
+ * Reads a big-endian 16-bit word and returns a native-endian value.
+ * No-op on a big-endian platform, byte-swaps on a little-endian platform.