Java Utililty Methods UUID Create

List of utility methods to do UUID Create

Description

The list of methods to do UUID Create are organized into topic(s).

Method

UUIDgenerateRequestId()
Generate a new request ID for this thread.
return UUID.randomUUID();
StringgenerateSegmentFileName(String segmentNameStr)
generate Segment File Name
return getSegmentNamePrefix(segmentNameStr) + UUID.randomUUID().toString();
StringgenerateSession()
generate Session
UUID uniqueKey = UUID.randomUUID();
String sessionKey = String.valueOf(uniqueKey);
return sessionKey;
StringgenerateShortUuid()
generate Short Uuid
StringBuilder shortBuilder = new StringBuilder();
String uuid = UUID.randomUUID().toString().replace("-", "");
for (int i = 0; i < 8; i++) {
    String str = uuid.substring(i * 4, i * 4 + 4);
    int x = Integer.parseInt(str, 16);
    shortBuilder.append(CHARS[x % 0x3E]);
return shortBuilder.toString();
...
StringgenerateSoapMessageId(String messageIdPrefix)
generate Soap Message Id
String randomId = UUID.randomUUID().toString();
return (messageIdPrefix == null) ? randomId : messageIdPrefix + randomId;
StringgenerateToken()
generate Token
return java.util.UUID.randomUUID().toString();
StringGenerateUniqueID()
Return a String which fulfills the uniqueness requirements stated in saml-core20-os.
return UUID.randomUUID().toString();
StringgenerateUniqueID()
generate Unique ID
DateFormat dateFormat = new SimpleDateFormat("ddMMyyHHmmss");
Date date = new Date();
return dateFormat.format(date);
StringgenerateUniqueID()
Generates a unique string (used for example as ID of assertions)
return UNIQUE_ID_PREFIX + UUID.randomUUID();
StringgenerateUniqueId()
generate Unique Id
UUID idOne = UUID.randomUUID();
String str = "" + idOne;
int uid = str.hashCode();
String filterStr = "" + uid;
str = filterStr.replaceAll("-", "");
return str;