public class AudioPermission extends BasicPermission
AudioPermission
类表示的音频系统资源的访问权限。一个
AudioPermission
包含目标的名字,但没有行为列表;你可以有命名的许可,或者你不
目标名称是音频权限的名称(见下表)。按照分级属性命名约定。另外,星号可以用来代表所有音频的权限。
下表列出了可能的AudioPermission
目标名称。对于每一个名称,该表提供了一个确切的描述允许允许,以及授予代码的权限的风险的讨论。
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. |
Constructor and Description |
---|
AudioPermission(String name)
创建一个新的
AudioPermission 对象有指定的符号名称,如“玩”或“记录”。
|
AudioPermission(String name, String actions)
创建一个新的
AudioPermission 对象有指定的符号名称,如“玩”或“记录”。
|
equals, getActions, hashCode, implies, newPermissionCollection
checkGuard, getName, toString
public AudioPermission(String name)
AudioPermission
对象有指定的符号名称,如“玩”或“记录”。星号可以用来表示所有音频的权限。
name
--新
AudioPermission
名称
null
name
NullPointerException
。
IllegalArgumentException
-如果
name
是空的。
public AudioPermission(String name, String actions)
AudioPermission
对象有指定的符号名称,如“玩”或“记录”。的
actions
参数是当前未使用的,应
null
。
name
--新
AudioPermission
名称
actions
-(未使用;应
null
)
null
name
NullPointerException
。
IllegalArgumentException
-如果
name
是空的。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.