public static boolean isPBMagicPrefix(final byte[] bytes, int offset, int len) {
    if (bytes == null || len < PB_MAGIC.length) return false;
    return compareTo(PB_MAGIC, 0, PB_MAGIC.length, bytes, offset, PB_MAGIC.length) == 0;
  }
Returns True if passed <code>bytes</code> has {@link #PB_MAGIC} for a prefix.
hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufMagic.java