Here you can find the source of generateUUIDName(String filename)
public static String generateUUIDName(String filename)
//package com.java2s; //License from project: Open Source License import java.util.UUID; public class Main { public static String generateUUIDName(String filename) { String ext = filename.substring(filename.indexOf(".") + 1); return UUID.randomUUID().toString() + "." + ext; }//from w ww . ja v a 2 s. c o m }