Package er.extensions.formatters

Examples of er.extensions.formatters.ERXUnitAwareDecimalFormat.format()


    String bytesReadSize = null;
    AjaxUploadProgress progress = uploadProgress();
    if (progress != null) {
      NumberFormat formatter = new ERXUnitAwareDecimalFormat(ERXUnitAwareDecimalFormat.BYTE);
      formatter.setMaximumFractionDigits(2);
      bytesReadSize = formatter.format(progress.value());
    }
    return bytesReadSize;
  }

  public String streamLengthSize() {
View Full Code Here


    String streamLengthSize = null;
    AjaxUploadProgress progress = uploadProgress();
    if (progress != null) {
      NumberFormat formatter = new ERXUnitAwareDecimalFormat(ERXUnitAwareDecimalFormat.BYTE);
      formatter.setMaximumFractionDigits(2);
      streamLengthSize = formatter.format(progress.maximum());
    }
    return streamLengthSize;
  }

  public String uploadFrameName() {
View Full Code Here

    String streamLengthSize = null;
    AjaxUploadProgress progress = uploadProgress();
    if (progress != null) {
      NumberFormat formatter = new ERXUnitAwareDecimalFormat(ERXUnitAwareDecimalFormat.BYTE);
      formatter.setMaximumFractionDigits(2);
      streamLengthSize = formatter.format(progress.maximum());
    }
    return streamLengthSize;
  }

  public String uploadFrameName() {
View Full Code Here

    String bytesReadSize = null;
    AjaxUploadProgress progress = uploadProgress();
    if (progress != null) {
      NumberFormat formatter = new ERXUnitAwareDecimalFormat(ERXUnitAwareDecimalFormat.BYTE);
      formatter.setMaximumFractionDigits(2);
      bytesReadSize = formatter.format(progress.value());
    }
    return bytesReadSize;
  }

  public String streamLengthSize() {
View Full Code Here

            Runtime runtime = Runtime.getRuntime();
            ERXUnitAwareDecimalFormat decimalFormatter = new ERXUnitAwareDecimalFormat(ERXUnitAwareDecimalFormat.BYTE);
            decimalFormatter.setMaximumFractionDigits(2);
          
            String info = "Before: ";
            info += decimalFormatter.format(runtime.maxMemory()) + " max, ";
            info += decimalFormatter.format(runtime.totalMemory()) + " total, ";
            info += decimalFormatter.format(runtime.totalMemory()-runtime.freeMemory()) + " used, ";
            info += decimalFormatter.format(runtime.freeMemory()) + " free\n";
           
            int count = 5;
View Full Code Here

            ERXUnitAwareDecimalFormat decimalFormatter = new ERXUnitAwareDecimalFormat(ERXUnitAwareDecimalFormat.BYTE);
            decimalFormatter.setMaximumFractionDigits(2);
          
            String info = "Before: ";
            info += decimalFormatter.format(runtime.maxMemory()) + " max, ";
            info += decimalFormatter.format(runtime.totalMemory()) + " total, ";
            info += decimalFormatter.format(runtime.totalMemory()-runtime.freeMemory()) + " used, ";
            info += decimalFormatter.format(runtime.freeMemory()) + " free\n";
           
            int count = 5;
            if(request().stringFormValueForKey("count") != null) {
View Full Code Here

            decimalFormatter.setMaximumFractionDigits(2);
          
            String info = "Before: ";
            info += decimalFormatter.format(runtime.maxMemory()) + " max, ";
            info += decimalFormatter.format(runtime.totalMemory()) + " total, ";
            info += decimalFormatter.format(runtime.totalMemory()-runtime.freeMemory()) + " used, ";
            info += decimalFormatter.format(runtime.freeMemory()) + " free\n";
           
            int count = 5;
            if(request().stringFormValueForKey("count") != null) {
              count = Integer.parseInt(request().stringFormValueForKey("count"));
View Full Code Here

          
            String info = "Before: ";
            info += decimalFormatter.format(runtime.maxMemory()) + " max, ";
            info += decimalFormatter.format(runtime.totalMemory()) + " total, ";
            info += decimalFormatter.format(runtime.totalMemory()-runtime.freeMemory()) + " used, ";
            info += decimalFormatter.format(runtime.freeMemory()) + " free\n";
           
            int count = 5;
            if(request().stringFormValueForKey("count") != null) {
              count = Integer.parseInt(request().stringFormValueForKey("count"));
            }
View Full Code Here

              count = Integer.parseInt(request().stringFormValueForKey("count"));
            }
            ERXExtensions.forceGC(count);
 
            info += "After: ";
            info += decimalFormatter.format(runtime.maxMemory()) + " max, ";
            info += decimalFormatter.format(runtime.totalMemory()) + " total, ";
            info += decimalFormatter.format(runtime.totalMemory()-runtime.freeMemory()) + " used, ";
            info += decimalFormatter.format(runtime.freeMemory()) + " free\n";

            result.setValue(info);
View Full Code Here

            }
            ERXExtensions.forceGC(count);
 
            info += "After: ";
            info += decimalFormatter.format(runtime.maxMemory()) + " max, ";
            info += decimalFormatter.format(runtime.totalMemory()) + " total, ";
            info += decimalFormatter.format(runtime.totalMemory()-runtime.freeMemory()) + " used, ";
            info += decimalFormatter.format(runtime.freeMemory()) + " free\n";

            result.setValue(info);
            log.info("GC forced\n"+info);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.