commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IO-373) FileUtils.byteCountToDisplaySize improvement/rounding issues
Date Sun, 21 Apr 2013 12:45:17 GMT

    [ https://issues.apache.org/jira/browse/IO-373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13637547#comment-13637547
] 

Mark commented on IO-373:
-------------------------

I added a warning to the method doc. The basic problem is that: do you want to display 100
MB as 99 MB? There just arent enough chars to display a meaningful representation when maxChars
<= 2. 0 GB isn't 0 B, so 0 GB is compatible with everything from 0 B to 500 MB.... so,
basically, just don't use maxChars <= 2.
                
> FileUtils.byteCountToDisplaySize improvement/rounding issues
> ------------------------------------------------------------
>
>                 Key: IO-373
>                 URL: https://issues.apache.org/jira/browse/IO-373
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Utilities
>    Affects Versions: 2.4
>            Reporter: Mark
>            Priority: Minor
>
> Issue IO-226 is not fixed but closed.
> ?
> Here is my solution that also support a user-defined precision in terms of a maximum
length of the digits part.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message