Microsoft SDK for Java

addHostRules

This method of the NetIOPermission Class adds a set of host rules and per-host port rules for the specified access types.

Syntax

public void addHostRules(int flags, String spec);

Parameters

flags The access flags, which consist of two separate flags combined with a logical OR operator (|). The first flag should be either BIND or CONNECT to specify the connection type. The second flag should be either ALLOW or DENY to indicate whether the rules being added indicate inclusion or exclusion. For convenience, instead of using the logical OR operator with the two flags, you can use one of the combination flags: ALLOWALL, DENYALL, ALLOWCONNECT, DENYCONNECT, ALLOWBIND, or DENYBIND.
spec The textual host/port specification.

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