Package com.ms.com |
![]() Previous |
![]() Contents |
![]() Index |
![]() Next |
public final class _Guid { // Constructors public _Guid(byte [] ba); public _Guid(int d1, short d2, short d3, byte b8, byte b9, byte b10, byte b11, byte b12, byte b13, byte b14, byte b15); public _Guid(String str); public _Guid(); // Methods public byte [] toByteArray(); public String toString(); public boolean equals(Object g2); public int hashCode(); public void set(byte [] ba); public void set(String str); public void set(int d1, short d2, short d3, byte b8, byte b9, byte b10, byte b11, byte b12, byte b13, byte b14, byte b15); }
The _Guid class represents Globally Unique Identifiers (GUIDs). GUIDs are 128-bit integer values that are used to assign world-wide unique identifications for COM interfaces and CoClasses.
The JCOM tool maps all GUIDs found in a type library to instances of the _Guid class.
public _Guid(byte [] ba);Allocates a new _Guid whose internal representation is the same as that of the 16-element byte argument. This constructor form is efficient, but not endian-portable. Therefore, its use is not recommended for cross-platform applications.
Parameter Description ba The 16-element byte array.
public _Guid(int d1, short d2, short d3, byte b8, byte b9, byte b10, byte b11, byte b12, byte b13, byte b14, byte b15);Allocates a new _Guid.
Parameter Description d1 A 32-bit integer. d2 A 16-bit integer. d3 A 16-bit integer. b8 An 8-bit integer. b9 An 8-bit integer. b10 An 8-bit integer. b11 An 8-bit integer. b12 An 8-bit integer. b13 An 8-bit integer. b14 An 8-bit integer b15 An 8-bit integer.
public _Guid(String str);Allocates a new _Guid from its String representation. The String representation is in the following form.
{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}In this form, each x is replaced by a hexadecimal digit (0-9|a-f|A-F).
Parameter Description str The GUID String representation.
public _Guid()Allocates a new _Guid. Its value is as follows:
{00000000-0000-0000-0000-000000000000}.
public byte [] toByteArray();Converts a GUID to a 16-element byte array. The byte array representation is not endian-portable. It cannot, therefore, be used to transmit GUIDs between processors.
Return Value:
Returns a 16-element byte array.
public String toString();Converts a GUID to its registry String representation.
Return Value:
Returns the registry String representation.
public boolean equals(Object g2);Tests two GUIDs for equality. Two GUIDs are equal if each of their 128 bits are equal.
Return Value:
Returns true only if each of the 128 bits in the two GUIDs are equal.
public int hashCode();Computes a hash code based on the value of the GUID.
Return Value:
Returns an integer hash code.
public void set(byte [] ba);Reinitializes an existing _Guid from a 16-element byte array. This method of reinitialization is not endian-portable.
Return Value:
No return value.
Parameter Description ba A 16-element byte array.
public void set(String str);Reinitializes an existing _Guid from its registry String representation. The String representation is in the following form.
{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}In this form, each x is replaced by a hexadecimal digit (0-9|a-f|A-F).
Return Value:
No return value.
Parameter Description str The registry String representation.
public void set(int d1, short d2, short d3, byte b8, byte b9, byte b10, byte b11, byte b12, byte b13, byte b14, byte b15);Reinitializes an existing _Guid.
Return Value:
No return value.
Parameter Description d1 A 32-bit integer. d2 A 16-bit integer. d3 A 16-bit integer. b8 An 8-bit integer. b9 An 8-bit integer. b10 An 8-bit integer. b11 An 8-bit integer. b12 An 8-bit integer. b13 An 8-bit integer. b14 An 8-bit integer. b15 An 8-bit integer.
© 1997 Microsoft Corporation. All rights reserved. Legal Notices.