Package org.miaixz.bus.core.io.stream
Class LineCounter
java.lang.Object
org.miaixz.bus.core.io.stream.LineCounter
- All Implemented Interfaces:
Closeable,AutoCloseable
行数计数器
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
LineCounter
构造- Parameters:
is- 输入流bufferSize- 缓存大小,小于1则使用默认的1024
-
-
Method Details
-
getCount
public int getCount()获取行数- Returns:
- 行数
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-