Microsoft SDK for Java

checkSystemStreams

This method of the StandardSecurityManager Class determines if classes within the current execution context, based on the call stack of the current thread, are allowed to set the specified system stream.

Syntax

public void checkSystemStreams(int streamID);

Parameters

streamID The system stream to set. The value must be one of the following:

0

Indicates an attempt to set System.in using System.setIn.

1

Indicates an attempt to set System.out using System.setOut.

2

Indicates an attempt to set System.err using System.setErr.


Remarks

The check succeeds only if all the classes found on the call stack possess SystemStreamsPermissions, and if those permissions allow the specified stream to be modified.

This security check is called by the java.lang.System APIs that set system streams using the System.setIn, System.setOut, and System.setErr methods.

Exceptions

SecurityException if the security check fails.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.