public boolean isInAlphabet ( final byte [ ] arrayOctet , final boolean allowWSPad ) { for ( int i = 0 ; i < arrayOctet . length ; i ++ ) { if ( ! isInAlphabet ( arrayOctet [ i ] ) && ( ! allowWSPad || ( arrayOctet [ i ] != PAD ) && ! isWhiteSpace ( arrayOctet [ i ] ) ) ) { return false ; } } return true ; }
Tests a given byte array to see if it contains only valid characters within the alphabet . The method optionally treats whitespace and pad as valid .