- java.lang.Object
-
- java.security.Permission
-
- java.security.BasicPermission
-
- java.nio.file.LinkPermission
-
- 实现的所有接口
-
Serializable
,Guard
public final class LinkPermissionextends BasicPermission
用于链接创建操作的Permission
类。下表提供了权限允许的摘要说明,并讨论了授予代码权限的风险。
Table shows permission target name, what the permission allows, and associated risks Permission Target Name What the Permission Allows Risks of Allowing this Permission hard Ability to add an existing file to a directory. This is sometimes known as creating a link, or hard link. Extreme care should be taken when granting this permission. It allows linking to any file or directory in the file system thus allowing the attacker access to all files. symbolic Ability to create symbolic links. Extreme care should be taken when granting this permission. It allows linking to any file or directory in the file system thus allowing the attacker to access to all files.
-
-
构造方法摘要
构造方法 构造器 描述 LinkPermission(String name)
构造具有指定名称的LinkPermission
。LinkPermission(String name, String actions)
构造具有指定名称的LinkPermission
。
-
方法摘要
-
声明方法的类 java.security.BasicPermission
equals, getActions, hashCode, implies, newPermissionCollection
-
声明方法的类 java.security.Permission
checkGuard, getName, toString
-
-
-
-
构造方法详细信息
-
LinkPermission
public LinkPermission(String name)
构造具有指定名称的LinkPermission
。- 参数
-
name
- 权限的名称。 它必须是“硬”或“象征性的”。 - 异常
-
IllegalArgumentException
- 如果名称为空或无效
-
LinkPermission
public LinkPermission(String name, String actions)
构造具有指定名称的LinkPermission
。- 参数
-
name
- 许可的名称; 必须是“硬”或“象征性的”。 -
actions
- 许可的行动; 必须是空字符串或null
- 异常
-
IllegalArgumentException
- if name is empty or invalid, or actions is a non-empty string
-
-