Java UUID Create generateFileName(String path)

Here you can find the source of generateFileName(String path)

Description

generate File Name

License

Open Source License

Declaration

public static String generateFileName(String path) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.UUID;

public class Main {
    public static String generateFileName(String path) {
        String suffix = "";
        if (path.lastIndexOf(".") != -1) {
            suffix = path.substring(path.lastIndexOf("."));
        }//from  w  w w  .ja  va  2 s  . c  o m
        return UUID.randomUUID().toString() + suffix;
    }
}

Related

  1. generateConsumerName(String serverInstanceId)
  2. generateContentID()
  3. generateCurrentTimestampUUID()
  4. generateEmailPrefix()
  5. generateFakedDeviceTokenString()
  6. generateGUID()
  7. generateGUID()
  8. generateId()
  9. generateID()