Class MultimediaPermission
public class MultimediaPermission implements IPermission,
IEncodablePermission
{
// Methods
public void check(Object request) throws SecurityException;
public IPermission combine(IPermission other);
public int compareSet (Object target);
public IPermission copy();
public boolean decode(String tag, InputStream data);
public boolean encode(String tag, OutputStream out);
public String mapFormat(String format);
public String[] supportedFormats();
public String toString();
}
This class represents a permission that allows the use of enhanced multimedia functionality. Currently, this permission allows access to extended aspects of the Microsoft® DirectX® APIs. Security checks for the multimedia permission are non-parameterized.
This class implements the IPermission and the IEncodablePermission interfaces.
public void check(Object request) throws SecurityException;
Performs a check on the permission object. Because security checks for the multimedia permission are non-parameterized, this method always succeeds.
Return Value:
No return value.
Parameter | Description |
request
| This parameter is ignored.
|
public IPermission combine(IPermission other);
Returns a new MultimediaPermission instance. Since checks for MultimediaPermission are non-parameterized, the combine operation serves no purpose.
Return Value:
Returns a new MultimediaPermission instance.
Parameter | Description |
other
| This parameter is ignored, but it must be an instance of the MultimediaPermission class.
|
public int compareSet (Object target);
Compares the MultimediaPermission instance against the specified permission object.
Return Value:
Returns EQUAL if the specified object is an instance of the MultimediaPermission class.
Parameter | Description |
target
| The permission object that the MultimediaPermission instance is compared against. It must be an instance of the MultimediaPermission class.
|
Exceptions:
IllegalArgumentException
if the specified Object is not an instance of the MultimediaPermission class.
public IPermission copy();
Retrieves a new instance of the MultimediaPermission class.
Return Value:
Returns a new MultimediaPermission instance.
public boolean decode(String tag, InputStream data);
Decodes the contents of the specified data stream into this permission object. The tag parameter specifies the type of data in the stream.
Return Value:
Returns true if the decoding operation succeeded; otherwise, returns false.
Parameter | Description |
tag
| The encoding type identifier.
|
data
| The raw data to construct the object from. The type of data is specified by the tag parameter.
|
public boolean encode(String tag, OutputStream out);
Encodes the contents of this permission object and sends the encoded data to the specified stream. The tag parameter specifies the type of encoding that should be used.
Return Value:
Returns true if the encoding operation succeeded; otherwise, returns false.
Parameter | Description |
tag
| The encoding type identifier.
|
out
| The output stream to send the encoded data to.
|
public String mapFormat(String format);
Retrieves a permission-specific tag, given an encoding format. The tag is then used with the encode and decode methods to specify an encoding type.
Return Value:
Returns the permission-specific tag that corresponds to the specified format.
Parameter | Description |
format
| The encoding format to retrieve the tag for.
|
public String[] supportedFormats();
Retrieves the encoding formats that this permission type supports.
Return Value:
Returns an array of the supported format identifiers.
public String toString();
Retrieves the string representation of the permission object.
Return Value:
Returns the string representation of the permission object.