Java UUID Create generateUUIDFileName(String fileName)

Here you can find the source of generateUUIDFileName(String fileName)

Description

generate UUID File Name

License

Apache License

Declaration

public static String generateUUIDFileName(String fileName) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.UUID;

public class Main {

    public static String generateUUIDFileName(String fileName) {

        UUID uuid = UUID.randomUUID();
        String str = fileName;//from  w  w  w  . j a va 2  s  .c  om
        System.out.println(str);
        str = uuid.toString() + "." + str.substring(str.lastIndexOf(".") + 1);
        return str;
    }
}

Related

  1. generateUuid(boolean dash)
  2. generateUUID(int numchars)
  3. generateUUID(Object o)
  4. generateUUID(String prefix)
  5. generateUuid(String seed)
  6. generateUUIDFrom(String uuidString)
  7. generateUUIDFromString(String uuid)
  8. generateUUIDName(String filename)
  9. generateUUIDRandom()