public static String generateCustomName ( ) { Random random = new Random ( ) ; StringBuilder sb = new StringBuilder ( ) ; sb . append ( PropertyConverter . getCurrentTimeSeconds ( ) ) ; sb . append ( ' ' ) ; int i = random . nextInt ( 99999 ) ; if ( i < 10 ) { sb . append ( "0000" ) ; } else if ( i < 100 ) { sb . append ( "000" ) ; } else if ( i < 1000 ) { sb . append ( "00" ) ; } else if ( i < 10000 ) { sb . append ( ' ' ) ; } sb . append ( i ) ; return sb . toString ( ) ; }
Generates a custom name containing numbers and an underscore ex . 282818_00023 . The name contains current seconds and a random number component .