public final class CommonUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
randomString() |
static String |
randomString(int length) |
static String |
randomString(int length,
boolean forceLowercase) |
static String |
randomString(int length,
boolean forceLowercase,
boolean digitsOnly) |
static InputStream |
replaceMacro(InputStream original,
hudson.util.VariableResolver<String> variableResolver)
Replace the variables in the given
InputStream and produce a new stream. |
static Random |
threadLocalRandom() |
public static InputStream replaceMacro(InputStream original, hudson.util.VariableResolver<String> variableResolver) throws IOException
InputStream and produce a new stream.
If the variableResolver is null, the original InputStream will be returned.
Note that although we're processing streams, all the contents will be loaded and returned for this substitution.
original - the original InputStreamvariableResolver - the variable resolverInputStream with the variables replaced by their values,
or the original if the variableResolver is null.IOException - error on reading the original InputStream.public static Random threadLocalRandom()
public static String randomString()
public static String randomString(int length)
public static String randomString(int length, boolean forceLowercase)
public static String randomString(int length, boolean forceLowercase, boolean digitsOnly)
Copyright © 2016–2017. All rights reserved.