Java File Size Readable Format formatSize(Integer size)

Here you can find the source of formatSize(Integer size)

Description

format Size

License

Open Source License

Declaration

public static int formatSize(Integer size) 

Method Source Code

//package com.java2s;

public class Main {
    public static int formatSize(Integer size) {
        return formatPositiveInt(size, 10);
    }//w w  w .j ava  2s .  c  o m

    public static int formatPositiveInt(Integer start, int defaultStart) {
        return start == null || start.intValue() < 0 ? defaultStart : start.intValue();
    }
}

Related

  1. formatInt(int val, int size)
  2. formatRow(String[] values, int[] sizes)
  3. formatSeperatorRow(int[] sizes)
  4. formatShortByte(long size)
  5. formatSize(double size)
  6. formatSize(long bytes)
  7. formatSize(long bytes, String b, String kb, String mb, String gb)
  8. formatSize(long size)
  9. formatSize(long size)