VLVResponseControl.fromASN1 constructor
VLVResponseControl.fromASN1(
- ASN1OctetString s
Implementation
VLVResponseControl.fromASN1(ASN1OctetString s) {
var bytes = s.encodedBytes;
// hack The octet string is actually a sequence. Not
// sure why ldap does this. Consider moving this to
// asn1 library. octetString.unwrapSequence();
bytes[0] = SEQUENCE_TYPE;
var seq = ASN1Sequence.fromBytes(bytes);
clogger.finest('Create control from $s seq=$seq');
var x = (seq.elements.first as ASN1Sequence);
// todo: confirm order of response
for (var e in x.elements) {
clogger.finest(' ${e.runtimeType} $e');
}
targetPosition = (x.elements[0] as ASN1Integer).intValue;
contentCount = (x.elements[1] as ASN1Integer).intValue;
extraParam = (x.elements[2] as ASN1Integer).intValue;
}