More consistent buffer padding. Added methods for determining JavFrame capacity.