- java.lang.Object
-
- java.security.Permission
-
- java.security.BasicPermission
-
- javax.sound.sampled.AudioPermission
-
- All Implemented Interfaces:
-
Serializable
,Guard
public class AudioPermission extends BasicPermission
AudioPermission
类代表对音频系统资源的访问权限。 一个AudioPermission
包含目标名称,但没有操作列表; 你有指定的权限,或者你没有。目标名称是音频许可的名称(请参见下表)。 这些名称遵循层次化属性命名约定。 此外,星号可用于表示所有音频权限。
下表列出了可能的
Permission target name, what the permission allows, and associated risks Permission Target Name What the Permission Allows Risks of Allowing this Permission play Audio playback through the audio device or devices on the system. Allows the application to obtain and manipulate lines and mixers for audio playback (rendering). In some cases use of this permission may affect other applications because the audio from one line may be mixed with other audio being played on the system, or because manipulation of a mixer affects the audio for all lines using that mixer. record Audio recording through the audio device or devices on the system. Allows the application to obtain and manipulate lines and mixers for audio recording (capture). In some cases use of this permission may affect other applications because manipulation of a mixer affects the audio for all lines using that mixer. This permission can enable an applet or application to eavesdrop on a user.AudioPermission
目标名称。 对于每个名称,该表格提供了该权限允许的准确描述,以及对授予代码许可的风险的讨论。- 从以下版本开始:
- 1.3
- 另请参见:
- Serialized Form
-
-
构造方法摘要
构造方法 Constructor 描述 AudioPermission(String name)
创建具有指定符号名称的新的AudioPermission
对象,例如“播放”或“记录”。AudioPermission(String name, String actions)
创建具有指定符号名称的新的AudioPermission
对象,例如“播放”或“记录”。
-
方法摘要
-
Methods inherited from class java.security.BasicPermission
equals, getActions, hashCode, implies, newPermissionCollection
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from class java.security.Permission
checkGuard, getName, toString
-
-
-
-
构造方法详细信息
-
AudioPermission
public AudioPermission(String name)
创建具有指定符号名称的新的AudioPermission
对象,例如“播放”或“记录”。 星号可用于指示所有音频权限。- 参数
-
name
- 新的名称AudioPermission
- 异常
-
NullPointerException
- 如果name
是null
-
IllegalArgumentException
- 如果name
为空
-
AudioPermission
public AudioPermission(String name, String actions)
创建具有指定符号名称的新的AudioPermission
对象,例如“播放”或“记录”。actions
参数当前未使用,应为null
。- 参数
-
name
- 新的名称AudioPermission
-
actions
- (未使用;应为null
) - 异常
-
NullPointerException
- 如果name
是null
-
IllegalArgumentException
- 如果name
为空
-
-