Java Random Byte Array randomBytes(byte[] bytes)

Here you can find the source of randomBytes(byte[] bytes)

Description

Get a number of pseudo random bytes.

License

Apache License

Parameter

Parameter Description
bytes the target array

Declaration

public static void randomBytes(byte[] bytes) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Random;

public class Main {
    private static final Random RANDOM = new Random();

    /**//  www.j  a va 2  s .  c  o m
     * Get a number of pseudo random bytes.
     *
     * @param bytes the target array
     */
    public static void randomBytes(byte[] bytes) {
        RANDOM.nextBytes(bytes);
    }
}

Related

  1. nextBytes(int length)
  2. randBytes(int length)
  3. randomByte(byte[] b)
  4. randomByteArray(int length)
  5. randomBytes()
  6. randomBytes(final int numBytes)
  7. randomBytes(int length)
  8. randomBytes(int length)
  9. randomBytes(int minimumCharacters, int maximumCharacters)