text: public static int getEncodedSizeWithoutArrayData(Ptg[] ptgs) {int result = 0;for (Ptg ptg : ptgs) {if (ptg instanceof ArrayPtg) {result += ArrayPtg.PLAIN_TOKEN_SIZE;} else {result += ptg.getSize();}}return result;}