Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for formatFileSize (0.31 sec)

  1. src/test/java/org/codelibs/fess/taglib/FessFunctionsTest.java

            assertEquals("0", FessFunctions.formatFileSize(0));
            assertEquals("1000", FessFunctions.formatFileSize(1000));
            assertEquals("976.6K", FessFunctions.formatFileSize(1000000));
            assertEquals("953.7M", FessFunctions.formatFileSize(1000000000));
            assertEquals("931.3G", FessFunctions.formatFileSize(1000000000000L));
            assertEquals("909.5T", FessFunctions.formatFileSize(1000000000000000L));
        }
    
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:37:57 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  2. src/main/webapp/WEB-INF/fe.tld

      </function>
    
      <function>
        <description>
          Returns formatted number as a file size from a given value.
        </description>
        <name>formatFileSize</name>
        <function-class>org.codelibs.fess.taglib.FessFunctions</function-class>
        <function-signature>java.lang.String formatFileSize(long)</function-signature>
        <example>
          ${fe:formatFileSize(doc.content_length)}
        </example>
      </function>
    
      <function>
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Sat Dec 23 06:18:48 UTC 2023
    - 10K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/fess/taglib/FessFunctions.java

            final Locale locale = ComponentUtil.getRequestManager().getUserLocale();
            if (locale == null) {
                return Locale.ROOT;
            }
            return locale;
        }
    
        public static String formatFileSize(final long value) {
            double target = value;
            String unit = ""; // TODO l10n?
            String format = "0.#";
            if (value < 1024) {
                format = "0";
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:53:18 UTC 2024
    - 16.9K bytes
    - Viewed (0)
Back to top