java.lang.Object
com.carrotsearch.randomizedtesting.generators.RandomBytes

public final class RandomBytes extends Object
Random byte sequence generators.
  • Constructor Details

    • RandomBytes

      public RandomBytes()
  • Method Details

    • randomBytesOfLength

      public static byte[] randomBytesOfLength(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(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.