Logo Search packages:      
Sourcecode: jlha-utils version File versions  Download package

String org::jlhafrontend::ListFormatter::getRATIO (  )  [inline]

get RATIO field

Returns:
string of the field

Definition at line 183 of file ListFormatter.java.

References toField().

Referenced by org::jlhafrontend::JLHAFrontEnd::list(), and org::jlhafrontend::JLHAFrontEnd::verboseList().

                             {
      
      long ratio_a,ratio_b;
      long osize;
      osize = lh.getOriginalSize();
      if (osize!=0) {
          ratio_a = lh.getCompressedSize()*1000/osize;
      } else {
          return (new String("******"));
      }
      ratio_b = ratio_a%10;
      ratio_a = ratio_a/10;
      return toField(Long.toString(ratio_a)+"."+Long.toString(ratio_b)+"%",6,false);
    }


Generated by  Doxygen 1.6.0   Back to index