Java UUID Create generateCurrentTimestampUUID()

Here you can find the source of generateCurrentTimestampUUID()

Description

generate Current Timestamp UUID

License

LGPL

Declaration

public static String generateCurrentTimestampUUID() 

Method Source Code


//package com.java2s;
/*//  w  w w . j a  v a 2  s.com
 Java UUID Generator (JUG)????UUID?????LGPL????????MAC?????
 UUID????License???????
 Java 5????????UUID???????????????Version 3/4?UUID?*/

import java.util.UUID;

public class Main {
    public static String generateCurrentTimestampUUID() {
        UUID uuid = UUID.randomUUID();
        String uuidStr = uuid.toString();
        uuidStr = uuidStr.replaceAll("-", "");
        return String.valueOf(System.currentTimeMillis()) + uuidStr.substring(0, 19);
    }
}

Related

  1. generateBoundary(final String value)
  2. generateClientId()
  3. generateConnectionId()
  4. generateConsumerName(String serverInstanceId)
  5. generateContentID()
  6. generateEmailPrefix()
  7. generateFakedDeviceTokenString()
  8. generateFileName(String path)
  9. generateGUID()