@ParametersAreNonnullByDefault public abstract class UserDefinedFileAttributesProvider extends FileAttributesProvider implements UserDefinedFileAttributeView
"user" file attribute viewUserDefinedFileAttributeView| Modifier | Constructor and Description |
|---|---|
protected |
UserDefinedFileAttributesProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(String name) |
Map<String,Object> |
getAllAttributes()
Get all attributes for this view
|
Object |
getAttributeByName(String name)
Get an attribute value by name
|
void |
setAttributeByName(String name,
Object value)
Set one attribute by name
|
int |
write(String name,
ByteBuffer src) |
nameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlist, name, read, sizeprotected UserDefinedFileAttributesProvider()
throws IOException
IOExceptionpublic int write(String name, ByteBuffer src) throws IOException
write in interface UserDefinedFileAttributeViewIOExceptionpublic void delete(String name) throws IOException
delete in interface UserDefinedFileAttributeViewIOExceptionpublic final void setAttributeByName(String name, Object value) throws IOException
FileAttributesProvidersetAttributeByName in class FileAttributesProvidername - the name of the attributevalue - the value of the attributeIOException - I/O error when trying to set the attributeReadOnlyAttributeException - the attribute is read only@Nullable public final Object getAttributeByName(String name) throws IOException
FileAttributesProvidergetAttributeByName in class FileAttributesProvidername - the name of the attributeIOException - I/O error when trying to set the attribute@Nonnull public Map<String,Object> getAllAttributes() throws IOException
FileAttributesProviderThe returned map will have the attribute names as keys and their
values as values. The returned map must be immutable (use
Collections.unmodifiableMap(Map) for instance).
The order of keys in the returned map is not guaranteed.
getAllAttributes in class FileAttributesProviderIOException - failure to read one or more attributes