Class FileWrapper

java.lang.Object
adalid.util.io.FileWrapper

public class FileWrapper extends Object
Author:
Jorge Campins
  • Constructor Details

    • FileWrapper

      public FileWrapper(File sourceFile)
  • Method Details

    • read

      public List<String> read()
    • 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
    • getLinesList

      public List<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 Path getRelativePath(Path base)