Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8369217

Add isBigEndian and isLittleEndian to java.nio.ByteOrder

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • core-libs
    • None

      Testing for big and little endian is implemented by comparing the enum constants.
      In most cases the code would be cleared to have direct `isBigEndian()` and `isLittleEndian` methods. Most useful when checking against the `nativeOrder`, as in:

      ```
         ByteOrder.nativeOrder().isBigEndian();
      ```

            rriggs Roger Riggs
            rriggs Roger Riggs
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: