apollo-core/src/main/java/com/ctrip/framework/foundation/internals/io/BOMInputStream.java/BOMInputStream/read
class BOMInputStream:  @Override
  public int read(final byte[] buf, int off, int len) throws IOException {
    int firstCount = 0;
    int b = 0;
    while (len > 0 && b >= 0) {
      b = readFirstBytes();
      if (b >= 0) {
        buf[off++] = (byte) (b & 0xFF);
        len--;
        firstCount++;
      }
    }
    final int secondCount = in.read(buf, off, len);
    return secondCount < 0 ? firstCount > 0 ? firstCount : EOF : firstCount + secondCount;
  }