commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r919253 - /commons/proper/io/trunk/src/java/org/apache/commons/io/FileUtils.java
Date Fri, 05 Mar 2010 01:00:08 GMT
Author: sebb
Date: Fri Mar  5 01:00:08 2010
New Revision: 919253

URL: http://svn.apache.org/viewvc?rev=919253&view=rev
Log:
IO-226 - document rounding behaviour

Modified:
    commons/proper/io/trunk/src/java/org/apache/commons/io/FileUtils.java

Modified: commons/proper/io/trunk/src/java/org/apache/commons/io/FileUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/java/org/apache/commons/io/FileUtils.java?rev=919253&r1=919252&r2=919253&view=diff
==============================================================================
--- commons/proper/io/trunk/src/java/org/apache/commons/io/FileUtils.java (original)
+++ commons/proper/io/trunk/src/java/org/apache/commons/io/FileUtils.java Fri Mar  5 01:00:08
2010
@@ -189,10 +189,16 @@
     /**
      * Returns a human-readable version of the file size, where the input
      * represents a specific number of bytes.
+     * 
+     * If the size is over 1GB, the size is returned as the number of whole GB,
+     * i.e. the size is rounded down to the nearest GB boundary.
+     * 
+     * Similarly for the 1MB and 1KB boundaries.
      *
      * @param size  the number of bytes
-     * @return a human-readable display value (includes units)
+     * @return a human-readable display value (includes units - GB, MB, KB or bytes)
      */
+    // See https://issues.apache.org/jira/browse/IO-226 - should the rounding be changed?
     public static String byteCountToDisplaySize(long size) {
         String displaySize;
 



Mime
View raw message