public final class FileAttributeViews extends Object
FileAttributeView
s and their attribute types.Modifier and Type | Field and Description |
---|---|
static String |
BASIC_NAME
The
BasicFileAttributeView name. |
static String |
DOS_NAME
The
DosFileAttributeView name. |
static String |
POSIX_NAME
The
PosixFileAttributeView name. |
Modifier and Type | Method and Description |
---|---|
static <A extends FileAttributeView> |
upcast(A view,
String targetName,
Class<A> targetType)
Converts a subclass of
targetType into a true view of type
targetType . |
public static final String BASIC_NAME
BasicFileAttributeView
name.public static final String POSIX_NAME
PosixFileAttributeView
name.public static final String DOS_NAME
DosFileAttributeView
name.public static <A extends FileAttributeView> A upcast(A view, String targetName, Class<A> targetType)
targetType
into a true view of type
targetType
. The behavior of the returned view is identical to the
input view except for the name
method, which returns
targetName
. If the view's name is already targetName
,
this method does nothing.view
- the view to converttargetName
- the name of the target viewtargetType
- the type of the target view, a subclass of
FileAttributeView