public class TextFileUtils extends Object
| Constructor and Description |
|---|
TextFileUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
fileEndsWithNewlineChar(File inFile)
Find out if the source file ends with a newline character.
|
static int |
getAmountOfNewlinesAtFileEnd(File inFile)
Get the amount of newline characters at the end of a file.
|
static int |
getNumberOfLines(File inFile)
Count number of lines in the file.
|
static int |
getNumberOfNonEmptyLines(File file,
Charset charset) |
public static int getNumberOfLines(File inFile) throws IOException
inFile - IOExceptionpublic static boolean fileEndsWithNewlineChar(File inFile) throws Exception
inFile - Exceptionpublic static int getAmountOfNewlinesAtFileEnd(File inFile) throws Exception
inFile - Exceptionpublic static int getNumberOfNonEmptyLines(File file, Charset charset) throws IOException
IOExceptionCopyright © 2015. All Rights Reserved.