Class DefaultAttributeValueEscaper

java.lang.Object
org.ldaptive.dn.DefaultAttributeValueEscaper
All Implemented Interfaces:
AttributeValueEscaper

public class DefaultAttributeValueEscaper extends Object implements AttributeValueEscaper
Escapes an attribute value per RFC 4514 section 2.4.
  • Constructor Details

    • DefaultAttributeValueEscaper

      public DefaultAttributeValueEscaper()
  • Method Details

    • escape

      public String escape(String value)
      Description copied from interface: AttributeValueEscaper
      Escapes the supplied attribute value.
      Specified by:
      escape in interface AttributeValueEscaper
      Parameters:
      value - to escape
      Returns:
      escaped value
    • escapeHex

      private void escapeHex(StringBuilder sb, char... hex)
      Appends a backslash for every two hex characters.
      Parameters:
      sb - to apppend to
      hex - to read