Class RandomBytes
Random byte sequence generators.
Inheritance
System.Object
RandomBytes
Namespace: Lucene.Net.Randomized.Generators
Assembly: Lucene.Net.TestFramework.dll
Syntax
public static class RandomBytes : object
Methods
| Improve this Doc View SourceRandomBytesOfLength(Random, Int32)
Declaration
public static byte[] RandomBytesOfLength(Random r, int length)
Parameters
| Type | Name | Description |
|---|---|---|
| Random | r | Random generator. |
| System.Int32 | length | The length of the byte array. Can be zero. |
Returns
| Type | Description |
|---|---|
| System.Byte[] | Returns a byte array with random content. |
RandomBytesOfLengthBetween(Random, Int32, Int32)
Declaration
public static byte[] RandomBytesOfLengthBetween(Random r, int minLength, int maxLength)
Parameters
| Type | Name | Description |
|---|---|---|
| Random | r | Random generator. |
| System.Int32 | minLength | The minimum length of the byte array. Can be zero. |
| System.Int32 | maxLength | The maximum length of the byte array. Can be zero. |
Returns
| Type | Description |
|---|---|
| System.Byte[] | Returns a byte array with random content. |