Skip navigation links

Oracle Application Server HTTPClient Java API Reference
10g Release 3 (10.1.3.1.0)

B32117-01


HTTPClient.ntlm
Class NtlmSupportFlags

java.lang.Object
  extended byHTTPClient.ntlm.NtlmSupportFlags


public final class NtlmSupportFlags
extends java.lang.Object

The NtlmSupportFlags class represents NTLM support flags send in NTLM messages. This class reads, interprets, and writes the flags, providing an API for flag access.

WARNING:
The meanings of the flags have not been officially acknowledged by Microsoft, which owns NTLM. Many third parties have empirically deduced the meanings of the flags.


Nested Class Summary
static interface NtlmSupportFlags.Flags
           

 

Constructor Summary
NtlmSupportFlags(byte[] initialNtlmFlags)
          Constructor
NtlmSupportFlags(int initialFlags)
          Constructor

 

Method Summary
 boolean anyFlagsOn(int flagMask)
          Determines the boolean result of ANDing the given mask with the current flag data.
 int clearFlags(int flags)
          Clears only the specified flags, updating the current state.
 int getFlags()
          Determines the current flag data.
 byte[] getNtlmBytes()
          Determines a byte array representing the current flag set values.
 int replaceFlags(byte[] newNtlmFlags)
          Replaces the flag data.
 int replaceFlags(int newFlags)
          Replaces the flag data.
 int setFlags(int flags)
          Sets only the specified flags, updating the current state.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

NtlmSupportFlags

public NtlmSupportFlags(int initialFlags)
Constructor
Parameters:
initialFlags - Initial flags

NtlmSupportFlags

public NtlmSupportFlags(byte[] initialNtlmFlags)
                 throws java.lang.IllegalArgumentException
Constructor
Parameters:
initialNtlmFlags - Initial flags as an NTLM 4-byte array in Little-Endian byte order.
Throws:
java.lang.IllegalArgumentException - initialNtlmFlags array is not EXACTLY 4 bytes long, or null.

Method Detail

getFlags

public int getFlags()
Determines the current flag data.
Returns:
The current flag data.

anyFlagsOn

public boolean anyFlagsOn(int flagMask)
Determines the boolean result of ANDing the given mask with the current flag data.
Parameters:
flagMask - Apply this mask
Returns:
true if the flagMask ANDed with the current flag state results in a non-zero value, otherwise false.

replaceFlags

public int replaceFlags(int newFlags)
Replaces the flag data.
Parameters:
newFlags - Set flags to this value
Returns:
Previous flag state

replaceFlags

public int replaceFlags(byte[] newNtlmFlags)
                 throws java.lang.IllegalArgumentException
Replaces the flag data.
Parameters:
newNtlmFlags - Flags as an NTLM 4-byte array in Little-Endian byte order.
Returns:
Previous flag state
Throws:
java.lang.IllegalArgumentException - newNtlmFlags array is not EXACTLY 4 bytes long, or null.

getNtlmBytes

public byte[] getNtlmBytes()

Determines a byte array representing the current flag set values. The bytes are in "Little Endian" byte order for direct insertion into NTLM messages.


setFlags

public int setFlags(int flags)
Sets only the specified flags, updating the current state.
Parameters:
flags - Set these flags
Returns:
Previous flag state

clearFlags

public int clearFlags(int flags)
Clears only the specified flags, updating the current state.
Parameters:
flags - Clear these flags
Returns:
Previous flag state

Skip navigation links

Oracle Application Server HTTPClient Java API Reference
10g Release 3 (10.1.3.1.0)

B32117-01


Copyright © 2004, 2006, Oracle. All rights reserved.