APIdia Launch Partner
Top Description Fields Constructors Methods
javax.sound.sampled

public Class AudioPermission

extends BasicPermission
Class Inheritance
Annotations
@Deprecated
since:24
forRemoval:true
Imports
java.io.Serial, java.security.BasicPermission

Deprecated

for removal since 24.

There is no replacement for this class.

The AudioPermission class represents access rights to the audio system resources. An AudioPermission contains a target name but no actions list; you either have the named permission or you don't.

The target name is the name of the audio permission. The names follow the hierarchical property-naming convention. Also, an asterisk can be used to represent all the audio permissions.

API Note

This permission cannot be used for controlling access to resources as the Security Manager is no longer supported. Consequently this class is deprecated and may be removed in a future release.

Author
Kara Kytle
Since
1.3

Field Summary

Modifier and TypeField and Description
private static final long
serialVersionUID

Hides java.security.BasicPermission.serialVersionUID.

Use serialVersionUID from JDK 1.3 for interoperability.

Constructor Summary

AccessConstructor and Description
public
AudioPermission(final String
the name of the new AudioPermission
name
)

Creates a new AudioPermission object that has the specified symbolic name, such as "play" or "record".

public
AudioPermission(final String
the name of the new AudioPermission
name
,
final String
(unused; should be null)
actions
)

Creates a new AudioPermission object that has the specified symbolic name, such as "play" or "record".

Method Summary

Inherited from java.security.BasicPermission:
equalsgetActionshashCodeimpliesnewPermissionCollection

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.security.BasicPermission.serialVersionUID.

Use serialVersionUID from JDK 1.3 for interoperability.

Annotations
@Serial

Constructor Detail

AudioPermissionback to summary
public AudioPermission(final String name)

Creates a new AudioPermission object that has the specified symbolic name, such as "play" or "record". An asterisk can be used to indicate all audio permissions.

Parameters
name:String

the name of the new AudioPermission

Exceptions
NullPointerException:
if name is null
IllegalArgumentException:
if name is empty
AudioPermissionback to summary
public AudioPermission(final String name, final String actions)

Creates a new AudioPermission object that has the specified symbolic name, such as "play" or "record". The actions parameter is currently unused and should be null.

Parameters
name:String

the name of the new AudioPermission

actions:String

(unused; should be null)

Exceptions
NullPointerException:
if name is null
IllegalArgumentException:
if name is empty