Here you can find the source of minSize(String str, int min, boolean nullCheck)
public static boolean minSize(String str, int min, boolean nullCheck)
//package com.java2s; //License from project: Apache License public class Main { public static boolean minSize(String str, int min, boolean nullCheck) { if (nullCheck == false || isRequired(str)) { if (str == null) { return true; }/* www. j av a 2 s. co m*/ int len = str.trim().getBytes().length; if (len >= min) { return true; } else { return false; } } else { return false; } } public static boolean isRequired(String str) { if (str == null || str.trim().length() == 0) { return false; } return true; } }