MCPcopy Create free account
hub / github.com/ReadyTalk/avian / nextBytes

Method nextBytes

classpath/java/util/Random.java:69–78  ·  view source on GitHub ↗
(byte[] bytes)

Source from the content-addressed store, hash-verified

67 }
68
69 public void nextBytes(byte[] bytes) {
70 final int length = bytes.length;
71 for (int i = 0; i < length;) {
72 int r = nextInt();
73 for (int j = Math.min(length - i, 4); j > 0; --j) {
74 bytes[i++] = (byte) r;
75 r >>= 8;
76 }
77 }
78 }
79
80 public long nextLong() {
81 return ((long) next(32) << 32) + next(32);

Callers 1

randomUUIDMethod · 0.80

Calls 2

nextIntMethod · 0.95
minMethod · 0.95

Tested by

no test coverage detected