Class FsDataFile

java.lang.Object
org.fastnate.data.files.FsDataFile
All Implemented Interfaces:
DataFile

public class FsDataFile extends Object implements DataFile
Represents a data file from the file system.
Author:
Tobias Liefke
  • Constructor Details

    • FsDataFile

      public FsDataFile(File file)
      Creates a new FsDataFile instance.
      Parameters:
      file - The represented file from the file system.
  • Method Details

    • getFolder

      public DataFolder getFolder()
      Description copied from interface: DataFile
      The folder that contains this file.
      Specified by:
      getFolder in interface DataFile
      Returns:
      the folder
    • getName

      public String getName()
      Description copied from interface: DataFile
      The name of this file.
      Specified by:
      getName in interface DataFile
      Returns:
      the name of this file
    • open

      public InputStream open() throws IOException
      Description copied from interface: DataFile
      Opens this file for input. The caller is responsible to close the stream.
      Specified by:
      open in interface DataFile
      Returns:
      the input stream of this file
      Throws:
      IOException - if the file is not accessible
    • getFile

      public File getFile()
      The represented file from the file system.