class LdapAttribute {

  public void addStringValues(final String... value)
  {
    Stream.of(value)
      .filter(Objects::nonNull)
      .map(v -> {
        if (binary) {
          try {
            return LdapUtils.base64Decode(v);
          } catch (IllegalArgumentException e) {
            throw new IllegalArgumentException("Error decoding " + v + " for " + attributeName, e);
          }
        }
        return v.getBytes(StandardCharsets.UTF_8);
      })
      .filter(Objects::nonNull)
      .map(ByteBuffer::wrap)
      .forEach(attributeValues::add);
  }

  public  LdapAttribute();
  public  LdapAttribute(final String type);
  public  LdapAttribute(final String type, final byte[]... value);
  public  LdapAttribute(final String type, final String... value);

}