apollo-core/src/main/java/com/ctrip/framework/foundation/internals/io/BOMInputStream.java/BOMInputStream/matches
class BOMInputStream:  private boolean matches(final ByteOrderMark bom) {
    // if (bom.length() != fbLength) {
    // return false;
    // }
    // firstBytes may be bigger than the BOM bytes
    for (int i = 0; i < bom.length(); i++) {
      if (bom.get(i) != firstBytes[i]) {
        return false;
      }
    }
    return true;
  }