⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unescapingvalues.java

📁 JAVA 工作指南 可以说是程序员必备的东西哦
💻 JAVA
字号:
import javax.naming.ldap.*;
import javax.naming.*;

/*
 * Shows how values in the RDN can be retrieved
 * from their string representation.
 */

public class UnescapingValues {
    
    public static void main(String args[]) {
         // DN with ',' (comma)
        String unformatted = "Juicy, Fruit";
        String formatted = Rdn.escapeValue(unformatted);
        System.out.println("Formatted:" + formatted);
        Object original = Rdn.unescapeValue(formatted);
        System.out.println("Original:" +  original);  

        // DN with a '+' (plus)
        unformatted = "true+false";
        formatted = Rdn.escapeValue(unformatted); 
        System.out.println("Formatted:" + formatted);
        original = Rdn.unescapeValue(formatted);
        System.out.println("Original:" +  original);  

        // DN with a binary value as one one of its attribute value
        byte[] bytes = new byte[] {1, 2, 3, 4};
        formatted = Rdn.escapeValue(bytes);
        System.out.println("Formatted:" + formatted);
        original = Rdn.unescapeValue(formatted);
        System.out.println("Original:" +  original);  
    }   
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -