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


Java HexBin类代码示例

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


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

示例1: getActualValue

import org.apache.xerces.impl.dv.util.HexBin; //导入依赖的package包/类
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
    byte[] decoded = HexBin.decode(content);
    if (decoded == null)
        throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "hexBinary"});

    return new XHex(decoded);
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:8,代码来源:HexBinaryDV.java

示例2: unparse

import org.apache.xerces.impl.dv.util.HexBin; //导入依赖的package包/类
/**
 * Convert a value of this datatype out
 * to lexical form.
 */
@Override
public String unparse(Object value) {
    if (value instanceof byte[]) {
        return HexBin.encode((byte[])value);
    } else {
        throw new DatatypeFormatException("hexBinary asked to encode a non-byte arrary");
    }
}
 
开发者ID:jacekkopecky,项目名称:parkjam,代码行数:13,代码来源:XSDhexBinary.java

示例3: getActualValue

import org.apache.xerces.impl.dv.util.HexBin; //导入依赖的package包/类
@Override
public Object getActualValue(String content)
		throws XSDBuiltinTypeFormatException {
	byte[] decoded = HexBin.decode(content);
	if(decoded == null) throw new XSDBuiltinTypeFormatException(content, "invalid HEXBIN value");
	
	return decoded;
}
 
开发者ID:jacekkopecky,项目名称:parkjam,代码行数:9,代码来源:HexBinaryValidator.java

示例4: ReviewStatus

import org.apache.xerces.impl.dv.util.HexBin; //导入依赖的package包/类
public ReviewStatus(Review review, User reviewer, String reviewComment, boolean completed, byte[] coverage, Date created, Date modified) {
    this.review = review;
    this.reviewer = reviewer;
    this.reviewComment = reviewComment;
    this.completed = completed;
    this.coverage = HexBin.encode(coverage);
    this.created = created;
    this.modified = modified;
}
 
开发者ID:tlaukkan,项目名称:groom-code-review-site,代码行数:10,代码来源:ReviewStatus.java

示例5: toString

import org.apache.xerces.impl.dv.util.HexBin; //导入依赖的package包/类
public synchronized String toString() {
    if (canonical == null) {
        canonical = HexBin.encode(data);
    }
    return canonical;
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:7,代码来源:HexBinaryDV.java

示例6: getCoverage

import org.apache.xerces.impl.dv.util.HexBin; //导入依赖的package包/类
public byte[] getCoverage() {
    if (coverageCache == null) {
        coverageCache = HexBin.decode(coverage);
    }
    return coverageCache;
}
 
开发者ID:tlaukkan,项目名称:groom-code-review-site,代码行数:7,代码来源:ReviewStatus.java

示例7: setCoverage

import org.apache.xerces.impl.dv.util.HexBin; //导入依赖的package包/类
public void setCoverage(byte[] coverage) {
    coverageCache = coverage;
    this.coverage = HexBin.encode(coverage);
}
 
开发者ID:tlaukkan,项目名称:groom-code-review-site,代码行数:5,代码来源:ReviewStatus.java


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