Here you can find the source of uuidWithTime()
public static String uuidWithTime()
//package com.java2s; /**/*w w w . j a v a2 s .c o m*/ * Copyright © 2012-2013 <a href="http://www.hzmux.com">hzmux</a> All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); */ import java.text.SimpleDateFormat; import java.util.Date; import java.util.UUID; public class Main { public static String uuidWithTime() { String time = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date()); return time + uuid(); } public static String uuid() { return UUID.randomUUID().toString().replaceAll("-", ""); } }