|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.dvb.io.persistent.FileAttributes
This class encapsulates the attributes of a file stored in persistent storage. The default attributes for a file are low priority, owner read / write only permissions and null expiration date.
Field Summary | |
static int |
PRIORITY_HIGH
Value for use as a file priority. |
static int |
PRIORITY_LOW
Value for use as a file priority. |
static int |
PRIORITY_MEDIUM
Value for use as a file priority. |
Constructor Summary | |
FileAttributes(java.util.Date expiration_date,
FileAccessPermissions p,
int priority)
Constructor. |
Method Summary | |
java.util.Date |
getExpirationDate()
Returns the expiration date. |
static FileAttributes |
getFileAttributes(java.io.File f)
Get the attributes of a file. |
FileAccessPermissions |
getPermissions()
Returns the file access permissions |
int |
getPriority()
Returns the priority to use in persistent storage |
void |
setExpirationDate(java.util.Date d)
Sets the expiration date. |
static void |
setFileAttributes(FileAttributes p,
java.io.File f)
Associate a set of file attributes with a file. |
void |
setPermissions(FileAccessPermissions p)
Sets the file access permissions. |
void |
setPriority(int priority)
Sets the priority to use in persistent storage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int PRIORITY_LOW
public static final int PRIORITY_MEDIUM
public static final int PRIORITY_HIGH
Constructor Detail |
public FileAttributes(java.util.Date expiration_date, FileAccessPermissions p, int priority)
expiration_date
- an expiration date or nullp
- the access permissions to usepriority
- the priority to use in persistent storageMethod Detail |
public java.util.Date getExpirationDate()
public void setExpirationDate(java.util.Date d)
d
- the expiration datepublic FileAccessPermissions getPermissions()
public void setPermissions(FileAccessPermissions p)
p
- the file access permissionspublic int getPriority()
public void setPriority(int priority)
priority
- the priority to setpublic static void setFileAttributes(FileAttributes p, java.io.File f) throws java.io.IOException
p
- the file attributes to usef
- the file to use
java.lang.SecurityException
- if the application is either denied access
to the file or directories needed to reach the file by security policy
or is not authorised to modify the attributes of the file.
java.io.IOException
- if access to the file fails due to an IO error or
if the file reference is not to a valid location in persistent storagepublic static FileAttributes getFileAttributes(java.io.File f) throws java.io.IOException
f
- the file to use
java.lang.SecurityException
- if the application is denied access
to the file or to directories needed to reach the file by security policy
java.io.IOException
- if access to the file fails due to an IO error or
if the file reference is not to a valid location in persistent storage
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |