`jsBody.put("charsAvailableInLastSegment", segs.get(segs.size() - 1).length());`