Here you can find the source of generateUUIDFileName(String fileName)
public static String generateUUIDFileName(String fileName)
//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; } }