Class FileMetaData

java.lang.Object
net.sf.basedb.opengrid.filetransfer.FileMetaData

public class FileMetaData
extends Object
Class for holding and collecting metadata about a remote or local file. When uploading a local file to a remote server the metadata instance is expected to contain information about the local file. When downloading a file from a remote server the metadata instance is populate with information about the remote file before the download starts.
Since:
1.0
Author:
nicklas
  • Field Details

    • size

      private long size
    • lastModified

      private long lastModified
    • lastAccessed

      private long lastAccessed
  • Constructor Details

    • FileMetaData

      public FileMetaData()
  • Method Details

    • getSize

      public long getSize()
      The number of bytes of the resource or 0 if not known.
    • setSize

      public void setSize​(long size)
      Set the size of the file that is about to be downloaded.
    • getLastModifiedTime

      public long getLastModifiedTime()
      Get the timestamp when the file was last modified.
      Returns:
      A Java timestamp or 0 if not supported
    • setLastModifiedTime

      public void setLastModifiedTime​(long timestamp)
      Set the date and time the file was last modified.
      Parameters:
      timestamp - A Java timestamp
    • getLastAccessedTime

      public long getLastAccessedTime()
      Get the timestamp when that the file was last accessed.
      Returns:
      A Java timestamp or 0 if not supported
    • setLastAccessedTime

      public void setLastAccessedTime​(long timestamp)
      Set the date and time the file was last accessed.
      Parameters:
      timestamp - A Java timestamp