add #size() to return the internal buffs size

This commit is contained in:
lionsoul2014 2025-12-15 17:39:30 +08:00
parent 897af4532e
commit 8c20994b12
1 changed files with 4 additions and 0 deletions

View File

@ -37,6 +37,10 @@ public class LongByteArray {
return length; return length;
} }
public int size() {
return buffs.size();
}
// internal method to determine the position of the specified offset // internal method to determine the position of the specified offset
private Position determinate(final long offset) { private Position determinate(final long offset) {
int index = 0, position = 0, buffLen = buffs.size(); int index = 0, position = 0, buffLen = buffs.size();