yangys
2025-08-11 d8772910ec07b06576029ba7913783915ee5579f
blade-service/blade-mdm/src/main/java/org/springblade/mdm/utils/FileContentUtil.java
@@ -112,8 +112,13 @@
    * @throws IOException
    */
   public static String readLineAt(InputStream inputStream,int lineIndex) throws IOException {
      byte[] bytes = inputStream.readAllBytes();
      ByteArrayInputStream byteStream = new ByteArrayInputStream(bytes);
      Charset charset = Charsets.charset(detectFromInputStream(byteStream));
      byteStream.reset();//重置,使继续可用
      String lineText = "";
      try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
      try (BufferedReader reader = new BufferedReader(new InputStreamReader(byteStream,charset))) {
         // 跳过第一行
         int current = 0;
         while(current<=lineIndex && lineText!=null) {