当前位置: 首页>>代码示例>>Java>>正文


Java X509NameTokenizer类代码示例

本文整理汇总了Java中org.apache.ws.security.components.crypto.X509NameTokenizer的典型用法代码示例。如果您正苦于以下问题:Java X509NameTokenizer类的具体用法?Java X509NameTokenizer怎么用?Java X509NameTokenizer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


X509NameTokenizer类属于org.apache.ws.security.components.crypto包,在下文中一共展示了X509NameTokenizer类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: splitAndTrim

import org.apache.ws.security.components.crypto.X509NameTokenizer; //导入依赖的package包/类
private Vector splitAndTrim(String inString) {
    X509NameTokenizer nmTokens = new X509NameTokenizer(inString);
    Vector vr = new Vector();

    while (nmTokens.hasMoreTokens()) {
        vr.add(nmTokens.nextToken());
    }
    java.util.Collections.sort(vr);
    return vr;
}
 
开发者ID:wso2,项目名称:carbon-identity-framework,代码行数:11,代码来源:ServerCrypto.java

示例2: checkEmpty

import org.apache.ws.security.components.crypto.X509NameTokenizer; //导入依赖的package包/类
private void
checkEmpty(
    final X509NameTokenizer tokenizer
) {
    checkTokenizer(
        tokenizer, new String[0]
    );
}
 
开发者ID:wso2,项目名称:wso2-wss4j,代码行数:9,代码来源:TestX509NameTokenizer.java

示例3: checkTokenizer

import org.apache.ws.security.components.crypto.X509NameTokenizer; //导入依赖的package包/类
private void
checkTokenizer(
    final X509NameTokenizer tokenizer,
    final String[] expected
) {
    for (int i = 0;  i < expected.length;  ++i) {
        assertTrue(tokenizer.hasMoreTokens());
        assertEquals(tokenizer.nextToken(), expected[i]);
    }
    assertTrue(!tokenizer.hasMoreTokens());
    assertEquals(tokenizer.nextToken(), "");
}
 
开发者ID:wso2,项目名称:wso2-wss4j,代码行数:13,代码来源:TestX509NameTokenizer.java

示例4: testEmptyX509NameTokenizer

import org.apache.ws.security.components.crypto.X509NameTokenizer; //导入依赖的package包/类
public void 
testEmptyX509NameTokenizer() {
    checkEmpty(new X509NameTokenizer(""));
    checkEmpty(new X509NameTokenizer("  "));
    checkEmpty(new X509NameTokenizer(" \t \n  \r\n"));
}
 
开发者ID:wso2,项目名称:wso2-wss4j,代码行数:7,代码来源:TestX509NameTokenizer.java

示例5: testWellFormedX509NameTokenizer

import org.apache.ws.security.components.crypto.X509NameTokenizer; //导入依赖的package包/类
public void 
testWellFormedX509NameTokenizer() {
    checkTokenizer(
        new X509NameTokenizer("foo"), 
        new String[] { "foo" }
    );
    checkTokenizer(
        new X509NameTokenizer(" foo   "), 
        new String[] { "foo" }
    );
    checkTokenizer(
        new X509NameTokenizer(" foo,   "), 
        new String[] { "foo", "" }
    );
    checkTokenizer(
        new X509NameTokenizer(" foo\\,   "), 
        new String[] { "foo\\,"}
    );
    checkTokenizer(
        new X509NameTokenizer(" foo\\,   bar  "), 
        new String[] { "foo\\,   bar"}
    );
    checkTokenizer(
        new X509NameTokenizer(" \"foo,\"   "), 
        new String[] { "\"foo,\""}
    );
    checkTokenizer(
        new X509NameTokenizer("foo, bar"), 
        new String[] { "foo", "bar"}
    );
    checkTokenizer(
        new X509NameTokenizer("\"foo bar\", gnu gnat"), 
        new String[] { "\"foo bar\"", "gnu gnat"}
    );
    checkTokenizer(
        new X509NameTokenizer("foo\\ "), 
        new String[] { "foo\\ "}
    );
    checkTokenizer(
        new X509NameTokenizer("foo\\\\ "), 
        new String[] { "foo\\\\"}
    );
}
 
开发者ID:wso2,项目名称:wso2-wss4j,代码行数:44,代码来源:TestX509NameTokenizer.java


注:本文中的org.apache.ws.security.components.crypto.X509NameTokenizer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。