APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.net

public final Class NetworkPermission

extends BasicPermission
Class Inheritance
Annotations
@Deprecated
since:25
forRemoval:true
Imports
java.security.BasicPermission

Deprecated

for removal since 25.

This permission cannot be used for controlling access to resources as the Security Manager is no longer supported.

Represents permission to access the extended networking capabilities defined in the jdk.net package. These permissions contain a target name, but no actions list. Callers either possess the permission or not.
Since
1.8
See Also
jdk.net.ExtendedSocketOptions

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
NetworkPermission(String
the permission target name
name
)

Creates a NetworkPermission with the given target name.

public
NetworkPermission(String
the permission target name
name
,
String
should be null. Is ignored if not.
actions
)

Creates a NetworkPermission with the given target name.

Method Summary

Inherited from java.security.BasicPermission:
equalsgetActionshashCodeimpliesnewPermissionCollection

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.security.BasicPermission.serialVersionUID.

Constructor Detail

NetworkPermissionback to summary
public NetworkPermission(String name)

Creates a NetworkPermission with the given target name.

Parameters
name:String

the permission target name

Exceptions
NullPointerException:
if name is null.
IllegalArgumentException:
if name is empty.
NetworkPermissionback to summary
public NetworkPermission(String name, String actions)

Creates a NetworkPermission with the given target name.

Parameters
name:String

the permission target name

actions:String

should be null. Is ignored if not.

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