|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.eaio.uuid.UUIDGen
public final class UUIDGen
This class contains methods to generate UUID fields. These methods have been
refactored out of UUID.
Starting with version 2, this implementation tries to obtain the MAC address
of the network card. Under Microsoft Windows, the ifconfig
command is used which may pop up a command window in Java Virtual Machines
prior to 1.4 once this class is initialized. The command window is closed
automatically.
The MAC address code has been tested extensively in Microsoft Windows, Linux, Solaris 8, HP-UX 11, but should work in MacOS X and BSDs, too.
If you use JDK 6 or later, the code in InterfaceAddress will be used.
UUID| Method Summary | |
|---|---|
static long |
createTime(long currentTimeMillis)
Creates a new time field from the given timestamp. |
static long |
getClockSeqAndNode()
Returns the current clockSeqAndNode value. |
static String |
getMACAddress()
Returns the MAC address. |
static long |
newTime()
Generates a new time field. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static long getClockSeqAndNode()
UUID.getClockSeqAndNode()public static long newTime()
UUID.getTime()public static long createTime(long currentTimeMillis)
currentTimeMillis will produce different time fields.
currentTimeMillis - the timestamp
UUID.getTime()public static String getMACAddress()
null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||