|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AttributeView
An object that provides a read-only or updatable view of non-opaque
values associated with an object in a filesystem. This interface is extended
or implemented by specific attribute views that define the attributes
supported by the view. A specific attribute view will typically define
type-safe methods to read or update the attributes that it supports. It also
provides dynamic access where the readAttributes
, getAttribute
and setAttributs
methods are used to access the attributes by names defined
by the attribute view. Implementations must ensure that the attribute names
do not contain the colon (':') or comma (',') characters.
Method Summary | |
---|---|
Object |
getAttribute(String attribute)
Reads the value of an attribute. |
String |
name()
Returns the name of the attribute view. |
Map<String,?> |
readAttributes(String first,
String... rest)
Reads all, or a subset, of the attributes supported by this file attribute view. |
void |
setAttribute(String attribute,
Object value)
Sets/updates the value of an attribute. |
Method Detail |
---|
String name()
Object getAttribute(String attribute) throws IOException
attribute
- the attribute name (case sensitive)
null
if the attribute is
not supported
IOException
- if an I/O error occurs
SecurityException
- if a security manager is set and it denies accessvoid setAttribute(String attribute, Object value) throws IOException
attribute
- the attribute name (case sensitive)value
- the attribute value
UnsupportedOperationException
- if the attribute is not supported or this attribute view does
not support updating the value of the attribute
IllegalArgumentException
- if the attribute value is of the correct type but has an
inappropriate value
ClassCastException
- if the attribute value is not of the expected type or is a
collection containing elements that are not of the expected
type
IOException
- if an I/O error occurs
SecurityException
- if a security manager is set and it denies accessMap<String,?> readAttributes(String first, String... rest) throws IOException
The first
and rest
parameters are the names of the
attributes to read. If any of the parameters has the value "*"
then all attributes are read. Attributes that are not supported are
ignored and will not be present in the returned map. It is implementation
specific if all attributes are read as an atomic operation with respect
to other file system operations.
first
- the name of an attribute to read (case sensitive)rest
- the names of other attributes to read (case sensitive)
IOException
- if an I/O error occurs
SecurityException
- if a security manager is set and it denies access
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |