Packages
 In this topic

*Methods

 

Packages   PreviousThis PackageNext
Package com.ms.security.permissions   Previous This
Package
Next

 


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.

Methods

check

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.

ParameterDescription
request This parameter is ignored.

combine

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.

ParameterDescription
other This parameter is ignored, but it must be an instance of the MultimediaPermission class.

compareSet

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.

ParameterDescription
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.

copy

public IPermission copy();

Retrieves a new instance of the MultimediaPermission class.

Return Value:

Returns a new MultimediaPermission instance.

decode

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.

ParameterDescription
tag The encoding type identifier.
data The raw data to construct the object from. The type of data is specified by the tag parameter.

encode

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.

ParameterDescription
tag The encoding type identifier.
out The output stream to send the encoded data to.

mapFormat

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.

ParameterDescription
format The encoding format to retrieve the tag for.

supportedFormats

public String[] supportedFormats();

Retrieves the encoding formats that this permission type supports.

Return Value:

Returns an array of the supported format identifiers.

toString

public String toString();

Retrieves the string representation of the permission object.

Return Value:

Returns the string representation of the permission object.

upnrm.gif © 1998 Microsoft Corporation. All rights reserved. Terms of use.