Here you can find the source of generateUniqueText()
public static String generateUniqueText()
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; public class Main { /**// w w w . j av a 2s.co m * This method generates a unique string based on the current system * date/time. * * @return */ public static String generateUniqueText() { Date date = new Date(); SimpleDateFormat UNIQUE_DATE_TIME_STRING_FORMAT = new SimpleDateFormat( "yyyyMMddHHmmSS"); String dateTimeString = UNIQUE_DATE_TIME_STRING_FORMAT.format(date); return dateTimeString; } }