code: private static byte[] checkIllegalCharacters(final byte[] bytes) {
          final ByteArrayOutputStream out = new ByteArrayOutputStream();
          for (final byte byt: bytes) {
              if (BASE64CHARS.indexOf(byt) < 0) {
                  out.write(byt);
              }
          }
          return out.toByteArray();
      }
docs: Check the byte array for non-Base64 characters.
  
  @param bytes The values to check
  @return An array of the found non-Base64 characters.