Here you can find the source of randomString()
protected static String randomString()
//package com.java2s; /**// w w w . jav a 2s .c om * The Heaton Research Spider Copyright 2007 by Heaton * Research, Inc. * * HTTP Programming Recipes for Java ISBN: 0-9773206-6-9 * http://www.heatonresearch.com/articles/series/16/ * * FormUtility: This class is used to construct responses to * HTML forms. The class supports both standard HTML forms, * as well as multipart forms. * * This class is released under the: * GNU Lesser General Public License (LGPL) * http://www.gnu.org/copyleft/lesser.html * * @author Jeff Heaton * @version 1.1 */ import java.util.*; public class Main { private static Random random = new Random(); /** * Generate a random string, of a specified length. This * is used to generate the multipart boundary. * * @return A random string. */ protected static String randomString() { return Long.toString(random.nextLong(), 36); } }