question: private static String stripWhitespace ( final String mosname ) { final StringBuffer sb = new StringBuffer ( ) ; final int size = mosname . length ( ) ; for ( int i = 0 ; i < size ; i ++ ) { final char ch = mosname . charAt ( i ) ; if ( ! Character . isWhitespace ( ch ) ) { sb . append ( ch ) ; } } return sb . toString ( ) ; }
target:  Utility method to strip whitespace from specified name (unlike trim(), whitespace is stripped at any position in the name).