public static String createRandomAlphanumeric ( final int length ) { final Random r = ThreadLocalRandom . current ( ) ; final char [ ] randomChars = new char [ length ] ; for ( int i = 0 ; i < length ; ++ i ) { randomChars [ i ] = ALPHANUMERICS [ r . nextInt ( ALPHANUMERICS . length ) ] ; } return new String ( randomChars ) ; }
Creates a random Strings consisting of alphanumeric characters with a length of 32 .