Here you can find the source of isAllWhitespace(CharSequence str)
public static boolean isAllWhitespace(CharSequence str)
//package com.java2s; public class Main { public static boolean isAllWhitespace(CharSequence str) { for (int i = 0; i < str.length(); i++) { if (!Character.isWhitespace(str.charAt(i))) { return false; }// ww w . j a v a 2 s .c o m } return true; } }