Uploaded image for project: 'Commons IO'
  1. Commons IO
  2. IO-226

Rounding issue with byteCountToDisplaySize(long size)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0
    • Utilities
    • None

    Description

      I do not understand the byteCountToDisplaySize(long size) method which is in class FileUtils of the package org.apache.commons.io.
      If the parameter size is 2047 , the method will return 1 KB.Why it will lose precision.
      I read the code.
      Maybe it is a bug?

      Attachments

        Activity

          People

            Unassigned Unassigned
            shukaiyuan shu kai yuan
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: