public static boolean isArrayByteBase64 ( byte [ ] arrayOctet ) { for ( int i = 0 ; i < arrayOctet . length ; i ++ ) { if ( ! isBase64 ( arrayOctet [ i ] ) && ! isWhiteSpace ( arrayOctet [ i ] ) ) { return false ; } } return true ; }
Tests a given byte array to see if it contains only valid characters within the Base64 alphabet . Currently the method treats whitespace as valid .