public static @NotNull InputStream inputStreamSkippingBOM(@NotNull InputStream stream) throws IOException {
    if (!stream.markSupported()) {
      //noinspection IOResourceOpenedButNotSafelyClosed
      stream = new BufferedInputStream(stream);
    }
    detectBOMFromStream(stream);
    return stream;
  }
public static @NotNull InputStream inputStreamSkippingBOM(@NotNull InputStream stream)