use of org.opends.server.types.ByteString in project midpoint by Evolveum.
the class OpenDJController method getAttributeValueBinary.
public static byte[] getAttributeValueBinary(Entry response, String name) {
List<Attribute> attrs = response.getAttribute(name.toLowerCase());
if (attrs == null || attrs.size() == 0) {
return null;
}
assertEquals("Too many attributes for name " + name + ": ", 1, attrs.size());
Attribute attribute = attrs.get(0);
ByteString value = attribute.iterator().next().getValue();
return value.toByteArray();
}
Aggregations