TextUtils { public static boolean isBlank(final CharSequence s) { if (s == null) { return true; } for (int i = 0; i < s.length(); i++) { if (!Character.isWhitespace(s.charAt(i))) { return false; } } return true; } private  TextUtils(); static boolean isEmpty(final CharSequence s); static boolean isBlank(final CharSequence s); static boolean containsBlanks(final CharSequence s); static String toHexString(final byte[] bytes);  }
@Test public void testTextBlank() { Assert.assertTrue(TextUtils.isBlank(null)); Assert.assertTrue(TextUtils.isBlank("")); Assert.assertTrue(TextUtils.isBlank(" ")); Assert.assertTrue(TextUtils.isBlank("\t")); }