Skip to content

Commit b5b5751

Browse files
committed
Update to use RandomAccessInput.readBytes bulk method
Signed-off-by: Asim Mahmood <asim.seng@gmail.com>
1 parent ffa46ca commit b5b5751

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

server/src/main/java/org/opensearch/common/util/ByteArrayBackedBitset.java

+1-5
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ public ByteArrayBackedBitset(int capacity) {
3131
*/
3232
public ByteArrayBackedBitset(RandomAccessInput in, long offset, int length) throws IOException {
3333
byteArray = new byte[length];
34-
int i = 0;
35-
while (i < length) {
36-
byteArray[i] = in.readByte(offset + i);
37-
i++;
38-
}
34+
in.readBytes(offset, byteArray, 0, length);
3935
}
4036

4137
/**

0 commit comments

Comments
 (0)