[
https://issues.apache.org/jira/browse/IO-373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13637547#comment-13637547
]
Mark edited comment on IO-373 at 4/21/13 12:52 PM:
---------------------------------------------------
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.
To put it another way: "0 GB" implies a precision at the GB level whereas 99 MB
would imply a range of 98.5 ... 99.5 MB.
was (Author: rnfm7avr):
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.
To put it another way: "0 GB" implies a precision at the GB level.
> 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