public class RandomStringUtil
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static char[] |
ALPHA_NUMERIC_RANGE |
protected static char[] |
ALPHA_RANGE |
protected static java.util.Random |
rnd |
| Constructor and Description |
|---|
RandomStringUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
random(int count,
char[] chars)
Creates random string whose length is the number of characters specified.
|
static java.lang.String |
random(int count,
char start,
char end)
Creates random string whose length is the number of characters specified.
|
static java.lang.String |
random(int count,
java.lang.String chars)
Creates random string whose length is the number of characters specified.
|
static java.lang.String |
randomAlpha(int count)
Creates random string of characters.
|
static java.lang.String |
randomAlphaNumeric(int count)
Creates random string of characters and digits.
|
static java.lang.String |
randomAscii(int count)
Creates random string whose length is the number of characters specified.
|
static java.lang.String |
randomNumeric(int count)
Creates random string that consist only of numbers.
|
static java.lang.String |
randomRanges(int count,
char... ranges)
Creates random string whose length is the number of characters specified.
|
protected static final java.util.Random rnd
protected static final char[] ALPHA_RANGE
protected static final char[] ALPHA_NUMERIC_RANGE
public static java.lang.String random(int count,
char[] chars)
public static java.lang.String random(int count,
java.lang.String chars)
public static java.lang.String random(int count,
char start,
char end)
public static java.lang.String randomAscii(int count)
32 and 126 (inclusive).public static java.lang.String randomNumeric(int count)
public static java.lang.String randomRanges(int count,
char... ranges)
public static java.lang.String randomAlpha(int count)
public static java.lang.String randomAlphaNumeric(int count)
Copyright © 2003-2013 Jodd Team