Top Description Fields Constructors Methods
java.net

pack-priv final Class SocketPermissionCollection

Located in compilation unit of java.net.SocketPermission.

extends PermissionCollection
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable

if (init'd with IP, key is IP as string) if wildcard, its the wild card else its the cname?
Author
Roland Schemers
See Also
java.security.Permission, java.security.Permissions, java.security.PermissionCollection

Field Summary

Modifier and TypeField and Description
private transient Map<String, SocketPermission>
private static final ObjectStreamField[]
private static final long

Constructor Summary

AccessConstructor and Description
public
SocketPermissionCollection()

Create an empty SocketPermissionCollection object.

Method Summary

Modifier and TypeMethod and Description
public void
add(Permission
the Permission object to add.
permission
)

Implements abstract java.security.PermissionCollection.add.

Adds a permission to the SocketPermissions.

public Enumeration<Permission>

Returns:

an enumeration of all the SocketPermission objects.
elements
()

Implements abstract java.security.PermissionCollection.elements.

Returns an enumeration of all the SocketPermission objects in the container.

public boolean

Returns:

true if "permission" is a proper subset of a permission in the collection, false if not.
implies
(Permission
the Permission object to compare
permission
)

Implements abstract java.security.PermissionCollection.implies.

Check and see if this collection of permissions implies the permissions expressed in "permission".

private void
readObject(ObjectInputStream
the ObjectInputStream from which data is read
in
)

Reads in a Vector of SocketPermission and saves them in the perms field.

private void
writeObject(ObjectOutputStream
the ObjectOutputStream to which data is written
out
)

Writes the state of this object to the stream.

Inherited from java.security.PermissionCollection:
elementsAsStreamisReadOnlysetReadOnlytoString

Field Detail

permsback to summary
private transient Map<String, SocketPermission> perms
serialPersistentFieldsback to summary
private static final ObjectStreamField[] serialPersistentFields
Annotations
@Serial
Serial Fields:
permissions:Vector
A list of the SocketPermissions for this set.
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.security.PermissionCollection.serialVersionUID.

Annotations
@Serial

Constructor Detail

SocketPermissionCollectionback to summary
public SocketPermissionCollection()

Create an empty SocketPermissionCollection object.

Method Detail

addback to summary
public void add(Permission permission)

Implements abstract java.security.PermissionCollection.add.

Adds a permission to the SocketPermissions. The key for the hash is the name in the case of wildcards, or all the IP addresses.

Parameters
permission:Permission

the Permission object to add.

Annotations
@Override
Exceptions
IllegalArgumentException:
if the permission is not a SocketPermission
SecurityException:
if this SocketPermissionCollection object has been marked readonly
elementsback to summary
public Enumeration<Permission> elements()

Implements abstract java.security.PermissionCollection.elements.

Returns an enumeration of all the SocketPermission objects in the container.

Returns:Enumeration<Permission>

an enumeration of all the SocketPermission objects.

Annotations
@Override
@SuppressWarnings:unchecked
impliesback to summary
public boolean implies(Permission permission)

Implements abstract java.security.PermissionCollection.implies.

Check and see if this collection of permissions implies the permissions expressed in "permission".

Parameters
permission:Permission

the Permission object to compare

Returns:boolean

true if "permission" is a proper subset of a permission in the collection, false if not.

Annotations
@Override
readObjectback to summary
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException

Reads in a Vector of SocketPermission and saves them in the perms field.

Parameters
in:ObjectInputStream

the ObjectInputStream from which data is read

Annotations
@Serial
Exceptions
IOException:
if an I/O error occurs
ClassNotFoundException:
if a serialized class cannot be loaded
writeObjectback to summary
private void writeObject(ObjectOutputStream out) throws IOException

Writes the state of this object to the stream.

Parameters
out:ObjectOutputStream

the ObjectOutputStream to which data is written

Annotations
@Serial
Exceptions
IOException:
if an I/O error occurs
Serial data
"permissions" field (a Vector containing the SocketPermissions).