code: public static void appendSize(StringBuilder buf, long size) {
          if (size >= 104857600) { // >= 100 MiB
              buf.append(size / 1048576).append("MiB(").append(size).append("B)");
          } else if (size >= 102400) { // >= 100 KiB
              buf.append(size / 1024).append("KiB(").append(size).append("B)");
          } else {
              buf.append(size).append('B');
          }
      }
docs: Appends the human-readable representation of the specified byte-unit {@code size} to the specified
  {@link StringBuffer}.