int encodedLength() throws IOException { return StreamUtil.calculateTagLength(tag) + StreamUtil.calculateBodyLength(octets.length) + octets.length; }
int encodedLength() throws IOException { return StreamUtil.calculateTagLength(tag) + StreamUtil.calculateBodyLength(octets.length) + octets.length; }
int encodedLength() throws IOException { if (!empty) { ASN1Primitive primitive = obj.toASN1Primitive(); 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; } }
int encodedLength() throws IOException { if (!empty) { ASN1Primitive primitive = obj.toASN1Primitive(); 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; } }
int encodedLength() throws IOException { if (!empty) { int length = obj.toASN1Primitive().toDLObject().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; } }
int encodedLength() throws IOException { if (!empty) { int length = obj.toASN1Primitive().toDLObject().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; } }
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; } }
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; } }