[REFACT] In AbstractByteBuffer: added func: getMaxSizeFromPtr/Offset