public class LineCounter extends Object implements Closeable
public LineCounter(InputStream is, int bufferSize)
is - 输入流bufferSize - 缓存大小,小于1则使用默认的1024public int getCount()
public void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableIOExceptionCopyright © 2024. All rights reserved.