Class FileFileLocation


  • class FileFileLocation
    extends FileLocation
    The location of a local file.
    Version:
    1.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.io.File file
      The file.
    • Constructor Summary

      Constructors 
      Constructor Description
      FileFileLocation​(java.io.File file)
      Constructor.
    • Field Detail

      • file

        private java.io.File file
        The file. This may or may not actually exist.
    • Constructor Detail

      • FileFileLocation

        FileFileLocation​(java.io.File file)
        Constructor.
        Parameters:
        file - The local file.
    • Method Detail

      • getFileFullPath

        public java.lang.String getFileFullPath()
        Returns the full path to the file.
        Specified by:
        getFileFullPath in class FileLocation
        Returns:
        The full path to the file.
        See Also:
        getFileName()
      • getInputStream

        protected java.io.InputStream getInputStream()
                                              throws java.io.IOException
        Description copied from class: FileLocation
        Opens an input stream for reading from this file.
        Specified by:
        getInputStream in class FileLocation
        Returns:
        The input stream.
        Throws:
        java.io.IOException - If the file does not exist, or some other IO error occurs.
      • getOutputStream

        protected java.io.OutputStream getOutputStream()
                                                throws java.io.IOException
        Description copied from class: FileLocation
        Opens an output stream for writing this file.
        Specified by:
        getOutputStream in class FileLocation
        Returns:
        An output stream.
        Throws:
        java.io.IOException - If an IO error occurs.
      • isLocalAndExists

        public boolean isLocalAndExists()
        Since file locations of this type are guaranteed to be local, this method returns whether the file exists.
        Specified by:
        isLocalAndExists in class FileLocation
        Returns:
        Whether this local file actually exists.
        See Also:
        isLocal()