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 Summary
Fields Modifier and Type Field Description private long
lastAccessed
private long
lastModified
private long
size
-
Constructor Summary
Constructors Constructor Description FileMetaData()
-
Method Summary
Modifier and Type Method Description long
getLastAccessedTime()
Get the timestamp when that the file was last accessed.long
getLastModifiedTime()
Get the timestamp when the file was last modified.long
getSize()
The number of bytes of the resource or 0 if not known.void
setLastAccessedTime(long timestamp)
Set the date and time the file was last accessed.void
setLastModifiedTime(long timestamp)
Set the date and time the file was last modified.void
setSize(long size)
Set the size of the file that is about to be downloaded.
-
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
-