code: public static String formatBytes(long filesize) {
  
          double kByte = Math.ceil(filesize / KILOBYTE);
          String formated = NumberFormat.getDecimalFormat().format(new Double(kByte));
          return formated + " KB";
      }
docs: Formats a given bytes value (file size).<p>
  
  @param filesize the file size to format
  
  @return the formated file size in KB