probably simplify:
    return bytes != null && new String(bytes).contains(pattern);