Package adalid.util.io
Class FileWrapper
- java.lang.Object
-
- adalid.util.io.FileWrapper
-
public class FileWrapper extends java.lang.Object- Author:
- Jorge Campins
-
-
Constructor Summary
Constructors Constructor Description FileWrapper(java.io.File sourceFile)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetBytes()FileBytesSizegetBytesSize()java.nio.charset.CharsetgetCharset()java.io.FilegetFile()intgetLines()java.util.List<java.lang.String>getLinesList()FileLinesSizegetLinesSize()java.nio.file.PathgetPath()intgetReadingErrors()intgetReadingWarnings()java.nio.file.PathgetRelativePath(java.nio.file.Path base)java.lang.StringgetType()booleanisEmpty()booleanisNotEmpty()booleanisText()java.util.List<java.lang.String>read()
-
-
-
Method Detail
-
read
public java.util.List<java.lang.String> read()
-
getFile
public java.io.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 java.nio.file.Path getPath()
- Returns:
- the path
-
getType
public java.lang.String getType()
- Returns:
- the type
-
getCharset
public java.nio.charset.Charset getCharset()
- Returns:
- the charset
-
getLinesList
public java.util.List<java.lang.String> getLinesList()
- Returns:
- the lines
-
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()
-
getRelativePath
public java.nio.file.Path getRelativePath(java.nio.file.Path base)
-
-