Java Random Int randomBlock(byte[] block, int off, int len)

Here you can find the source of randomBlock(byte[] block, int off, int len)

Description

random Block

License

Open Source License

Declaration

public static void randomBlock(byte[] block, int off, int len) 

Method Source Code

//package com.java2s;

public class Main {
    public static void randomBlock(byte[] block, int off, int len) {
        for (int i = off; i < off + len; ++i)
            block[i] = (byte) (Math.random() * 256.0);
    }//from   w  ww .  j  av a2s .co  m

    public static void randomBlock(byte[] block) {
        randomBlock(block, 0, block.length);
    }
}

Related

  1. randomAlphanumericString(int length)
  2. randomAlphaString(int length)
  3. randomArray(int len)
  4. randomArray(int min, int max, int n)
  5. randomBases(int n)
  6. randomByteArray(int length)
  7. randomByteArray(int size, byte from, byte to)
  8. randomByteAsInt()
  9. randomBytes(int size)