/** * The encodedLength (in octets) of the list of EncodedDataTypes * * @return encodedLength of the compositeType */ public int encodedLength() { int length = 0; for (final Type t : containedTypeByNameMap.values()) { if (t.isVariableLength()) { return Token.VARIABLE_LENGTH; } if (t.offsetAttribute() != -1) { length = t.offsetAttribute(); } if (t.presence() != Presence.CONSTANT) { length += t.encodedLength(); } } return length; }
/** * The encodedLength (in octets) of the list of EncodedDataTypes * * @return encodedLength of the compositeType */ public int encodedLength() { int length = 0; for (final Type t : containedTypeByNameMap.values()) { if (t.isVariableLength()) { return Token.VARIABLE_LENGTH; } if (t.offsetAttribute() != -1) { length = t.offsetAttribute(); } if (t.presence() != Presence.CONSTANT) { length += t.encodedLength(); } } return length; }
/** * The encodedLength (in octets) of the list of EncodedDataTypes * * @return encodedLength of the compositeType */ public int encodedLength() { int length = 0; for (final Type t : containedTypeByNameMap.values()) { if (t.isVariableLength()) { return Token.VARIABLE_LENGTH; } if (t.offsetAttribute() != -1) { length = t.offsetAttribute(); } if (t.presence() != Presence.CONSTANT) { length += t.encodedLength(); } } return length; }