MCPcopy
hub / github.com/brianfrankcooper/YCSB / toArray

Method toArray

core/src/main/java/site/ycsb/ByteIterator.java:93–103  ·  view source on GitHub ↗

Consumes remaining contents of this object, and returns them as a byte array.

()

Source from the content-addressed store, hash-verified

91
92 /** Consumes remaining contents of this object, and returns them as a byte array. */
93 public byte[] toArray() {
94 long left = bytesLeft();
95 if (left != (int) left) {
96 throw new ArrayIndexOutOfBoundsException("Too much data to fit in one array!");
97 }
98 byte[] ret = new byte[(int) left];
99 for (int i = 0; i < ret.length; i++) {
100 ret[i] = nextByte();
101 }
102 return ret;
103 }
104
105}

Callers 15

updateMethod · 0.95
toStringMethod · 0.95
testReadSingleRowMethod · 0.95
testReadAllMethod · 0.95
testUpdateMethod · 0.95
testInsertMethod · 0.95
insertMethod · 0.45
insertMethod · 0.45
updateMethod · 0.45
insertMethod · 0.45
updateMethod · 0.45
testScanMethod · 0.45

Calls 2

bytesLeftMethod · 0.95
nextByteMethod · 0.95

Tested by 15

testReadSingleRowMethod · 0.76
testReadAllMethod · 0.76
testUpdateMethod · 0.76
testInsertMethod · 0.76
testScanMethod · 0.36
testScanMethod · 0.36
twoThreadsMethod · 0.36