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


Java URI.MalformedURIException方法代码示例

本文整理汇总了Java中com.sun.org.apache.xerces.internal.util.URI.MalformedURIException方法的典型用法代码示例。如果您正苦于以下问题:Java URI.MalformedURIException方法的具体用法?Java URI.MalformedURIException怎么用?Java URI.MalformedURIException使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sun.org.apache.xerces.internal.util.URI的用法示例。


在下文中一共展示了URI.MalformedURIException方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getActualValue

import com.sun.org.apache.xerces.internal.util.URI; //导入方法依赖的package包/类
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
    // check 3.2.17.c0 must: URI (rfc 2396/2723)
    try {
        if( content.length() != 0 ) {
            // encode special characters using XLink 5.4 algorithm
            final String encoded = encode(content);
            // Support for relative URLs
            // According to Java 1.1: URLs may also be specified with a
            // String and the URL object that it is related to.
            new URI(BASE_URI, encoded );
        }
    } catch (URI.MalformedURIException ex) {
        throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "anyURI"});
    }

    // REVISIT: do we need to return the new URI object?
    return content;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:AnyURIDV.java

示例2: resolveSystemId

import com.sun.org.apache.xerces.internal.util.URI; //导入方法依赖的package包/类
/** Resolves a system identifier against a base URI. */
private String resolveSystemId(String systemId, String baseURI) {
    try {
        return XMLEntityManager.expandSystemId(systemId, baseURI, false);
    }
    // In the event that resolution failed against the
    // base URI, just return the system id as is. There's not
    // much else we can do.
    catch (URI.MalformedURIException ex) {
        return systemId;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:ValidatorHandlerImpl.java

示例3: absolutizeAgainstUserDir

import com.sun.org.apache.xerces.internal.util.URI; //导入方法依赖的package包/类
/**
 * Absolutizes a URI using the current value
 * of the "user.dir" property as the base URI. If
 * the URI is already absolute, this is a no-op.
 *
 * @param uri the URI to absolutize
 */
public static void absolutizeAgainstUserDir(URI uri)
    throws URI.MalformedURIException {
    uri.absolutize(getUserDir());
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:XMLEntityManager.java


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