Package adalid.util.io
Class FileWrapper
- java.lang.Object
-
- adalid.util.io.FileWrapper
-
public class FileWrapper extends Object
- Author:
- Jorge Campins
-
-
Constructor Summary
Constructors Constructor Description FileWrapper(File sourceFile)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetBytes()FileBytesSizegetBytesSize()CharsetgetCharset()FilegetFile()intgetLines()List<String>getLinesList()FileLinesSizegetLinesSize()PathgetPath()intgetReadingErrors()intgetReadingWarnings()PathgetRelativePath(Path base)StringgetType()booleanisEmpty()booleanisNotEmpty()booleanisText()List<String>read()
-
-
-
Constructor Detail
-
FileWrapper
public FileWrapper(File sourceFile)
-
-
Method Detail
-
getFile
public File getFile()
- Returns:
- the file
-
getBytes
public long getBytes()
- Returns:
- the length of the file in bytes
-
getBytesSize
public FileBytesSize getBytesSize()
- Returns:
- the size corresponding to the number of bytes
-
getPath
public Path getPath()
- Returns:
- the path
-
getType
public String getType()
- Returns:
- the type
-
getCharset
public Charset getCharset()
- Returns:
- the charset
-
getLines
public int getLines()
- Returns:
- the length of the file in lines
-
getLinesSize
public FileLinesSize getLinesSize()
- Returns:
- the size corresponding to the number of lines
-
getReadingWarnings
public int getReadingWarnings()
- Returns:
- the reading warnings count
-
getReadingErrors
public int getReadingErrors()
- Returns:
- the reading errors count
-
isText
public boolean isText()
- Returns:
- true if the file is a text file; false otherwise
-
isEmpty
public boolean isEmpty()
- Returns:
- true if the file is an empty file; false otherwise
-
isNotEmpty
public boolean isNotEmpty()
-
-