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

Add "BYTES" constant to primitive wrapper classes

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 8
    • core-libs
    • b66
    • generic
    • generic
    • Verified

      Add a BYTES constant to each of the primitive wrapper types. The SIZE value provided with primitive types is expresses the size of the type in bits. Frequently the size of a type in bytes is needed as bytes are the smallest unit of allocation. The most frequent use of the SIZE constant is to determine the size in in bytes for a type via (type).SIZE / Byte.SIZE

      This change adds a constant BYTES to each of the primitive wrapper classes (Byte, Character, Double, Float, Integer, Long, Short) with the calculation (type).SIZE / Byte.SIZE already made.

            mduigou Mike Duigou
            mduigou Mike Duigou
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: