# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Methods | Inherited Methods

# FileOwnerAttributeView

`public interface FileOwnerAttributeView`
`implements FileAttributeView`

java.nio.file.attribute.FileOwnerAttributeView

Known indirect subclasses AclFileAttributeView, PosixFileAttributeView
AclFileAttributeView | A file attribute view that supports reading or updating a file's Access Control Lists (ACL) or file owner attributes.
PosixFileAttributeView | A file attribute view that provides a view of the file attributes commonly associated with files on file systems used by operating systems that implement the Portable Operating System Interface (POSIX) family of standards.

A file attribute view that supports reading or updating the owner of a file. This file attribute view is intended for file system implementations that support a file attribute that represents an identity that is the owner of the file. Often the owner of a file is the identity of the entity that created the file.

The `getOwner` or `setOwner` methods may be used to read or update the owner of the file.

The `getAttribute` and `setAttribute` methods may also be used to read or update the owner. In that case, the owner attribute is identified by the name `"owner"`, and the value of the attribute is a `UserPrincipal`.

## Summary

### Public methods
`abstract UserPrincipal` | `getOwner()` Read the file owner.
`abstract String` | `name()` Returns the name of the attribute view.
`abstract void` | `setOwner(UserPrincipal owner)` Updates the file owner.

### Inherited methods
From interface `java.nio.file.attribute.AttributeView`
`abstract String` | `name()` Returns the name of the attribute view.

## Public methods

### getOwner

    public abstract UserPrincipal getOwner ()

Read the file owner.

It it implementation specific if the file owner can be a `GroupPrincipal`.

Returns
`UserPrincipal` | the file owner

Throws
`IOException` | if an I/O error occurs
`SecurityException` | In the case of the default provider, a security manager is installed, and it denies `RuntimePermission``("accessUserInformation")` or its `SecurityManager#checkRead(String)` method denies read access to the file.

### name

    public abstract String name ()

Returns the name of the attribute view. Attribute views of this type have the name `"owner"`.

Returns
`String` | the name of the attribute view

### setOwner

    public abstract void setOwner (UserPrincipal owner)

Updates the file owner.

It it implementation specific if the file owner can be a `GroupPrincipal`. To ensure consistent and correct behavior across platforms it is recommended that this method should only be used to set the file owner to a user principal that is not a group.

Parameters
`owner` | `UserPrincipal`: the new file owner

Throws
`IOException` | if an I/O error occurs, or the `owner` parameter is a group and this implementation does not support setting the owner to a group
`SecurityException` | In the case of the default provider, a security manager is installed, and it denies `RuntimePermission``("accessUserInformation")` or its `SecurityManager#checkWrite(String)` method denies write access to the file.

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*