public class FileAttributes extends Object
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
FileAttributes(Date expiration_date,
FileAccessPermissions p,
int priority)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Date |
getExpirationDate()
Returns the expiration date.
|
static FileAttributes |
getFileAttributes(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(Date d)
Sets the expiration date.
|
static void |
setFileAttributes(FileAttributes p,
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
|
public static final int PRIORITY_LOW
public static final int PRIORITY_MEDIUM
public static final int PRIORITY_HIGH
public FileAttributes(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 storagepublic Date getExpirationDate()
public void setExpirationDate(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, File f) throws IOException
p - the file attributes to usef - the file to useSecurityException - 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.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(File f) throws IOException
f - the file to useSecurityException - if the application is denied access
to the file or to directories needed to reach the file by security policyIOException - if access to the file fails due to an IO error or
if the file reference is not to a valid location in persistent storageCopyright © 2012 code4tv.com. All Rights Reserved.