[jira] [Updated] (IO-226) Rounding issue with byteCountToDisplaySize(long size)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (IO-226) Rounding issue with byteCountToDisplaySize(long size)

ASF GitHub Bot (Jira)

     [ https://issues.apache.org/jira/browse/IO-226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary D. Gregory updated IO-226:
-------------------------------

    Summary: Rounding issue with byteCountToDisplaySize(long size)  (was: question with byteCountToDisplaySize(long size))
   

> Rounding issue with byteCountToDisplaySize(long size)
> -----------------------------------------------------
>
>                 Key: IO-226
>                 URL: https://issues.apache.org/jira/browse/IO-226
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Utilities
>            Reporter: shu kai yuan
>             Fix For: 2.0
>
>
> 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?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira