Top Description Fields Methods
org.apache.sshd.common.random

public Interface Random

extends NamedResource
Known Direct Implementers
org.apache.sshd.common.random.AbstractRandom
Imports
org.apache.sshd.common.NamedResource

A pseudo random number generator.
Author
Apache MINA SSHD Project

Field Summary

Inherited from org.apache.sshd.common.NamedResource:
BY_NAME_COMPARATORNAME_EXTRACTOR

Method Summary

Modifier and TypeMethod and Description
public default void
fill(byte[]
The bytes to fill
bytes
)

Fill the buffer with random values

public void
fill(byte[]
byte array to be filled.
bytes
,
int
index to start filling at.
start
,
int
length of segment to fill.
len
)

Fill part of bytes with random values.

public int

Returns:

The randomly selected value in the range
random
(int
The range upper limit
n
)

Returns a pseudo-random uniformly distributed int in the half-open range [0, n).

Inherited from org.apache.sshd.common.NamedResource:
findByNamefindFirstMatchByNamegetNamegetNameListgetNamesofNameremoveByNamesafeCompareByName

Method Detail

fillback to summary
public default void fill(byte[] bytes)

Fill the buffer with random values

Parameters
bytes:byte[]

The bytes to fill

See Also
fill(byte[], int, int)
fillback to summary
public void fill(byte[] bytes, int start, int len)

Fill part of bytes with random values.

Parameters
bytes:byte[]

byte array to be filled.

start:int

index to start filling at.

len:int

length of segment to fill.

randomback to summary
public int random(int n)

Returns a pseudo-random uniformly distributed int in the half-open range [0, n).

Parameters
n:int

The range upper limit

Returns:int

The randomly selected value in the range