Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for formatFileSize (0.09 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: 2024-10-31 13:40
    - Last Modified: 2024-02-22 01:37
    - 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: 2024-10-31 13:40
    - Last Modified: 2023-12-23 06:18
    - 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: 2024-10-31 13:40
    - Last Modified: 2024-02-22 01:53
    - 16.9K bytes
    - Viewed (0)
Back to top