Class RandomBytes
- java.lang.Object
-
- com.carrotsearch.randomizedtesting.generators.RandomBytes
-
public final class RandomBytes extends java.lang.Object
Random byte sequence generators.
-
-
Constructor Summary
Constructors Constructor Description RandomBytes()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
randomBytesOfLength(java.util.Random r, int length)
static byte[]
randomBytesOfLengthBetween(java.util.Random r, int minLength, int maxLength)
-
-
-
Method Detail
-
randomBytesOfLength
public static byte[] randomBytesOfLength(java.util.Random r, int length)
- Parameters:
r
- Random generator.length
- The length of the byte array. Can be zero.- Returns:
- Returns a byte array with random content.
-
randomBytesOfLengthBetween
public static byte[] randomBytesOfLengthBetween(java.util.Random r, int minLength, int maxLength)
- Parameters:
r
- Random generator.minLength
- The minimum length of the byte array. Can be zero.maxLength
- The maximum length of the byte array. Can be zero.- Returns:
- Returns a byte array with random content.
-
-