int encodedLength() throws IOException { if (encoded != null) { return 1 + StreamUtil.calculateBodyLength(encoded.length) + encoded.length; } else { return super.toDLObject().encodedLength(); } }
int encodedLength() throws IOException { if (!empty) { ASN1Primitive primitive = obj.toASN1Primitive().toDERObject(); int length = primitive.encodedLength(); if (explicit) { return StreamUtil.calculateTagLength(tagNo) + StreamUtil.calculateBodyLength(length) + length; } else { // header length already in calculation length = length - 1; return StreamUtil.calculateTagLength(tagNo) + length; } } else { return StreamUtil.calculateTagLength(tagNo) + 1; } }
@Override int encodedLength() { return 1 + StreamUtil.calculateBodyLength(bytes.length) + bytes.length; }
int encodedLength() { return 1 + StreamUtil.calculateBodyLength(string.length) + string.length; }
int encodedLength() throws IOException { int length = getBodyLength(); return 1 + StreamUtil.calculateBodyLength(length) + length; }