public long getLength() { long length = sb.toString().getBytes().length; length += trailer.length(); for (ByteData byteData : dataList) length += byteData.getSize(); return length; }