• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java DeserializationException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: readExternal

import org.javarosa.core.util.externalizable.DeserializationException; //导入依赖的package包/类
/** Reads a group definition object from the supplied stream. */
public void readExternal(DataInputStream dis, PrototypeFactory pf) throws IOException, DeserializationException {
	setID(ExtUtil.readInt(dis));
	setAppearanceAttr((String)ExtUtil.read(dis, new ExtWrapNullable(String.class), pf));
	setBind((IDataReference)ExtUtil.read(dis, new ExtWrapTagged(), pf));
	setTextID((String)ExtUtil.read(dis, new ExtWrapNullable(String.class), pf));
	setLabelInnerText((String)ExtUtil.read(dis, new ExtWrapNullable(String.class), pf));
	setRepeat(ExtUtil.readBool(dis));
	setChildren((List<IFormElement>)ExtUtil.read(dis, new ExtWrapListPoly(), pf));

	noAddRemove = ExtUtil.readBool(dis);
	count = (IDataReference)ExtUtil.read(dis, new ExtWrapNullable(new ExtWrapTagged()), pf);

	chooseCaption = ExtUtil.nullIfEmpty(ExtUtil.readString(dis));
	addCaption = ExtUtil.nullIfEmpty(ExtUtil.readString(dis));
	delCaption = ExtUtil.nullIfEmpty(ExtUtil.readString(dis));
	doneCaption = ExtUtil.nullIfEmpty(ExtUtil.readString(dis));
	addEmptyCaption = ExtUtil.nullIfEmpty(ExtUtil.readString(dis));
	doneEmptyCaption = ExtUtil.nullIfEmpty(ExtUtil.readString(dis));
	entryHeader = ExtUtil.nullIfEmpty(ExtUtil.readString(dis));
	delHeader = ExtUtil.nullIfEmpty(ExtUtil.readString(dis));
	mainHeader = ExtUtil.nullIfEmpty(ExtUtil.readString(dis));

	additionalAttributes = ExtUtil.readAttributes(dis, null);
}
 
开发者ID:medic,项目名称:javarosa,代码行数:26,代码来源:GroupDef.java


示例2: readExternal

import org.javarosa.core.util.externalizable.DeserializationException; //导入依赖的package包/类
public void readExternal(DataInputStream dis, PrototypeFactory pf) throws IOException, DeserializationException {
	setID(ExtUtil.readInt(dis));
	binding = (IDataReference)ExtUtil.read(dis, new ExtWrapNullable(new ExtWrapTagged()), pf);
	setAppearanceAttr((String)ExtUtil.read(dis, new ExtWrapNullable(String.class), pf));
	setTextID((String)ExtUtil.read(dis, new ExtWrapNullable(String.class), pf));
	setLabelInnerText((String)ExtUtil.read(dis, new ExtWrapNullable(String.class), pf));
	setHelpText((String)ExtUtil.read(dis, new ExtWrapNullable(String.class), pf));
	setHelpTextID((String)ExtUtil.read(dis, new ExtWrapNullable(String.class), pf));
       setHelpInnerText((String)ExtUtil.read(dis, new ExtWrapNullable(String.class), pf));

	setControlType(ExtUtil.readInt(dis));

	additionalAttributes = ExtUtil.readAttributes(dis, null);

	choices = (List<SelectChoice>) ExtUtil.nullIfEmpty((List<SelectChoice>)ExtUtil.read(dis, new ExtWrapList(SelectChoice.class), pf));
	for (int i = 0; i < getNumChoices(); i++) {
		choices.get(i).setIndex(i);
	}
	setDynamicChoices((ItemsetBinding)ExtUtil.read(dis, new ExtWrapNullable(ItemsetBinding.class)));
}
 
开发者ID:medic,项目名称:javarosa,代码行数:21,代码来源:QuestionDef.java


示例3: readExternal

import org.javarosa.core.util.externalizable.DeserializationException; //导入依赖的package包/类
public void readExternal(DataInputStream in, PrototypeFactory pf)
        throws IOException, DeserializationException {
    contentType = ExtUtil.nullIfEmpty(ExtUtil.readString(in));
    status = (int)ExtUtil.readNumeric(in);
    failureReason = ExtUtil.nullIfEmpty(ExtUtil.readString(in));
    failureCount = (int)ExtUtil.readNumeric(in);
    failureCount = 0;
    queueIdentifier = ExtUtil.readString(in);
    created = ExtUtil.readDate(in);
    created = created.getTime() == 0 ? null : created;
    sent = ExtUtil.readDate(in);
    sent = sent.getTime() == 0 ? null : sent;
    queuingDeadline = ExtUtil.readNumeric(in);
    recordId = (int)ExtUtil.readNumeric(in);

    //Enforce the queing deadline
    if(status == TransportMessageStatus.QUEUED && queuingDeadline < new Date().getTime() ) {
        status = TransportMessageStatus.CACHED;
    }
}
 
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:21,代码来源:BasicTransportMessage.java


示例4: restoreSessionFromStream

import org.javarosa.core.util.externalizable.DeserializationException; //导入依赖的package包/类
/**
 * Builds a session by restoring a serialized SessionFrame and syncing from that.
 * Doesn't support restoring the frame stack
 */
public static CommCareSession restoreSessionFromStream(CommCarePlatform ccPlatform,
                                                       DataInputStream inputStream)
        throws DeserializationException, IOException {
    SessionFrame restoredFrame = new SessionFrame();
    restoredFrame.readExternal(inputStream, ExtUtil.defaultPrototypes());

    CommCareSession restoredSession = new CommCareSession(ccPlatform);
    restoredSession.frame = restoredFrame;
    Vector<SessionFrame> frames = (Vector<SessionFrame>) ExtUtil.read(inputStream, new ExtWrapList(SessionFrame.class), null);
    Stack<SessionFrame> stackFrames = new Stack<>();
    while(!frames.isEmpty()){
        SessionFrame lastElement = frames.lastElement();
        frames.remove(lastElement);
        stackFrames.push(lastElement);
    }
    restoredSession.setFrameStack(stackFrames);
    restoredSession.syncState();

    return restoredSession;
}
 
开发者ID:dimagi,项目名称:commcare-core,代码行数:25,代码来源:CommCareSession.java


示例5: readExternal

import org.javarosa.core.util.externalizable.DeserializationException; //导入依赖的package包/类
@Override
public void readExternal(DataInputStream in, PrototypeFactory pf)
        throws IOException, DeserializationException {
    id = ExtUtil.nullIfEmpty(ExtUtil.readString(in));
    root = ExtUtil.readString(in);
    rawRelevance = ExtUtil.nullIfEmpty(ExtUtil.readString(in));
    display = (DisplayUnit)ExtUtil.read(in, DisplayUnit.class, pf);
    commandIds = (Vector<String>)ExtUtil.read(in, new ExtWrapList(String.class), pf);
    commandExprs = new String[ExtUtil.readInt(in)];
    for (int i = 0; i < commandExprs.length; ++i) {
        if (ExtUtil.readBool(in)) {
            commandExprs[i] = ExtUtil.readString(in);
        }
    }
    style = ExtUtil.nullIfEmpty(ExtUtil.readString(in));
}
 
开发者ID:dimagi,项目名称:commcare-core,代码行数:17,代码来源:Menu.java


示例6: readExternal

import org.javarosa.core.util.externalizable.DeserializationException; //导入依赖的package包/类
@Override
public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException {
    name = ExtUtil.nullIfEmpty(ExtUtil.readString(in));
    multiplicity = ExtUtil.readInt(in);
    flags = ExtUtil.readInt(in);
    value = (IAnswerData)ExtUtil.read(in, new ExtWrapNullable(new ExtWrapTagged()), pf);

    readChildrenFromExternal(in, pf);

    dataType = ExtUtil.readInt(in);
    instanceName = ExtUtil.nullIfEmpty(ExtUtil.readString(in));
    constraint = (Constraint)ExtUtil.read(in, new ExtWrapNullable(
            Constraint.class), pf);
    preloadHandler = ExtUtil.nullIfEmpty(ExtUtil.readString(in));
    preloadParams = ExtUtil.nullIfEmpty(ExtUtil.readString(in));
    namespace = ExtUtil.nullIfEmpty(ExtUtil.readString(in));

    readAttributesFromExternal(in, pf);
}
 
开发者ID:dimagi,项目名称:commcare-core,代码行数:20,代码来源:TreeElement.java


示例7: readExternal

import org.javarosa.core.util.externalizable.DeserializationException; //导入依赖的package包/类
@Override
public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException {
    axis = ExtUtil.readInt(in);
    test = ExtUtil.readInt(in);

    switch (test) {
        case TEST_NAME:
            name = (XPathQName)ExtUtil.read(in, XPathQName.class, pf);
            break;
        case TEST_NAMESPACE_WILDCARD:
            namespace = ExtUtil.readString(in);
            break;
        case TEST_TYPE_PROCESSING_INSTRUCTION:
            literal = (String)ExtUtil.read(in, new ExtWrapNullable(String.class), pf);
            break;
    }

    Vector v = (Vector)ExtUtil.read(in, new ExtWrapListPoly(), pf);
    predicates = new XPathExpression[v.size()];
    for (int i = 0; i < predicates.length; i++) {
        predicates[i] = (XPathExpression)v.elementAt(i);
    }
}
 
开发者ID:dimagi,项目名称:commcare-core,代码行数:24,代码来源:XPathStep.java


示例8: readExternal

import org.javarosa.core.util.externalizable.DeserializationException; //导入依赖的package包/类
@Override
public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException {
    id = (String)ExtUtil.read(in, new ExtWrapNullable(String.class), pf);
    title = (DisplayUnit)ExtUtil.read(in, DisplayUnit.class, pf);
    titleForm = (String)ExtUtil.read(in, new ExtWrapNullable(String.class), pf);
    nodeset = (TreeReference)ExtUtil.read(in, new ExtWrapNullable(TreeReference.class), pf);
    Vector<Detail> theDetails = (Vector<Detail>)ExtUtil.read(in, new ExtWrapList(Detail.class), pf);
    details = new Detail[theDetails.size()];
    ArrayUtilities.copyIntoArray(theDetails, details);
    Vector<DetailField> theFields = (Vector<DetailField>)ExtUtil.read(in, new ExtWrapList(DetailField.class), pf);
    fields = new DetailField[theFields.size()];
    ArrayUtilities.copyIntoArray(theFields, fields);
    variables = (OrderedHashtable<String, String>)ExtUtil.read(in, new ExtWrapMap(String.class, String.class, ExtWrapMap.TYPE_ORDERED), pf);
    actions = (Vector<Action>)ExtUtil.read(in, new ExtWrapList(Action.class), pf);
    callout = (Callout)ExtUtil.read(in, new ExtWrapNullable(Callout.class), pf);
    forceLandscapeView = ExtUtil.readBool(in);
    focusFunction = (XPathExpression)ExtUtil.read(in, new ExtWrapNullable(new ExtWrapTagged()), pf);
    numEntitiesToDisplayPerRow = (int)ExtUtil.readNumeric(in);
    useUniformUnitsInCaseTile = ExtUtil.readBool(in);
    parsedRelevancyExpression = (XPathExpression)ExtUtil.read(in, new ExtWrapNullable(new ExtWrapTagged()), pf);
}
 
开发者ID:dimagi,项目名称:commcare-core,代码行数:22,代码来源:Detail.java


示例9: readExternal

import org.javarosa.core.util.externalizable.DeserializationException; //导入依赖的package包/类
@Override
public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException {
    id = (String)ExtUtil.read(in, new ExtWrapNullable(String.class));
    title = (DisplayUnit)ExtUtil.read(in, DisplayUnit.class, pf);
    titleForm = (String)ExtUtil.read(in, new ExtWrapNullable(String.class));
    nodeset = (TreeReference)ExtUtil.read(in, new ExtWrapNullable(TreeReference.class), pf);
    Vector<Detail> theDetails = (Vector<Detail>)ExtUtil.read(in, new ExtWrapList(Detail.class), pf);
    details = new Detail[theDetails.size()];
    ArrayUtilities.copyIntoArray(theDetails, details);
    Vector<DetailField> theFields = (Vector<DetailField>)ExtUtil.read(in, new ExtWrapList(DetailField.class), pf);
    fields = new DetailField[theFields.size()];
    ArrayUtilities.copyIntoArray(theFields, fields);
    variables = (OrderedHashtable<String, String>)ExtUtil.read(in, new ExtWrapMap(String.class, String.class, ExtWrapMap.TYPE_SLOW_READ_ONLY));
    actions = (Vector<Action>)ExtUtil.read(in, new ExtWrapList(Action.class), pf);
    callout = (Callout)ExtUtil.read(in, new ExtWrapNullable(Callout.class), pf);
}
 
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:17,代码来源:Detail.java


示例10: readExternal

import org.javarosa.core.util.externalizable.DeserializationException; //导入依赖的package包/类
public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException {
	id = (XPathQName)ExtUtil.read(in, XPathQName.class);
       List<Object> v = (List<Object>)ExtUtil.read(in, new ExtWrapListPoly(), pf);

	args = new XPathExpression[v.size()];
	for (int i = 0; i < args.length; i++)
		args[i] = (XPathExpression)v.get(i);
}
 
开发者ID:medic,项目名称:javarosa,代码行数:9,代码来源:XPathFuncExpr.java


示例11: readExternal

import org.javarosa.core.util.externalizable.DeserializationException; //导入依赖的package包/类
public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException {
	if (in.readByte() == (byte)0x00) {
		d = ExtUtil.readNumeric(in);
	} else {
		d = ExtUtil.readDecimal(in);
	}
}
 
开发者ID:medic,项目名称:javarosa,代码行数:8,代码来源:XPathNumericLiteral.java


示例12: readExternal

import org.javarosa.core.util.externalizable.DeserializationException; //导入依赖的package包/类
public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException {
	x = (XPathExpression)ExtUtil.read(in, new ExtWrapTagged(), pf);
       List<Object> v = (List<Object>)ExtUtil.read(in, new ExtWrapListPoly(), pf);

	predicates = new XPathExpression[v.size()];
	for (int i = 0; i < predicates.length; i++)
		predicates[i] = (XPathExpression)v.get(i);
}
 
开发者ID:medic,项目名称:javarosa,代码行数:9,代码来源:XPathFilterExpr.java


示例13: readExternal

import org.javarosa.core.util.externalizable.DeserializationException; //导入依赖的package包/类
public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException {
	init_context = ExtUtil.readInt(in);
	if (init_context == INIT_CONTEXT_EXPR) {
		filtExpr = (XPathFilterExpr)ExtUtil.read(in, XPathFilterExpr.class, pf);
	}

     List<Object> v = (List<Object>)ExtUtil.read(in, new ExtWrapList(XPathStep.class), pf);
	steps = new XPathStep[v.size()];
	for (int i = 0; i < steps.length; i++)
		steps[i] = ((XPathStep)v.get(i)).intern();
}
 
开发者ID:medic,项目名称:javarosa,代码行数:12,代码来源:XPathPathExpr.java


示例14: readExternal

import org.javarosa.core.util.externalizable.DeserializationException; //导入依赖的package包/类
public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException {
	axis = ExtUtil.readInt(in);
	test = ExtUtil.readInt(in);

	switch (test) {
	case TEST_NAME: name = (XPathQName)ExtUtil.read(in, XPathQName.class); break;
	case TEST_NAMESPACE_WILDCARD: namespace = ExtUtil.readString(in); break;
	case TEST_TYPE_PROCESSING_INSTRUCTION: literal = (String)ExtUtil.read(in, new ExtWrapNullable(String.class)); break;
	}

     List<Object> v = (List<Object>)ExtUtil.read(in, new ExtWrapListPoly(), pf);
	predicates = new XPathExpression[v.size()];
	for (int i = 0; i < predicates.length; i++)
		predicates[i] = (XPathExpression)v.get(i);
}
 
开发者ID:medic,项目名称:javarosa,代码行数:16,代码来源:XPathStep.java


示例15: readExternal

import org.javarosa.core.util.externalizable.DeserializationException; //导入依赖的package包/类
public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException {
	setId((String)ExtUtil.read(in, new ExtWrapNullable(String.class), pf));
	setDataType(ExtUtil.readInt(in));
	setPreload((String)ExtUtil.read(in, new ExtWrapNullable(String.class), pf));
	setPreloadParams((String)ExtUtil.read(in, new ExtWrapNullable(String.class), pf));
	ref = (IDataReference)ExtUtil.read(in, new ExtWrapTagged());

	//don't bother reading relevancy/required/readonly/constraint/calculate/additionalAttrs right now; they're only used during parse anyway
}
 
开发者ID:medic,项目名称:javarosa,代码行数:10,代码来源:DataBinding.java


示例16: readExternal

import org.javarosa.core.util.externalizable.DeserializationException; //导入依赖的package包/类
public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException {
	isLocalizable = ExtUtil.readBool(in);
	setLabelInnerText(ExtUtil.nullIfEmpty(ExtUtil.readString(in)));
	setTextID(ExtUtil.nullIfEmpty(ExtUtil.readString(in)));
	value = ExtUtil.nullIfEmpty(ExtUtil.readString(in));
	//index will be set by questiondef
}
 
开发者ID:medic,项目名称:javarosa,代码行数:8,代码来源:SelectChoice.java


示例17: readExternal

import org.javarosa.core.util.externalizable.DeserializationException; //导入依赖的package包/类
@Override
public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException,
        DeserializationException {
	points.clear();
    int len = (int) ExtUtil.readNumeric(in);
    for ( int i = 0 ; i < len ; ++i ) {
    	GeoPointData t = new GeoPointData();
    	t.readExternal(in, pf);
    	points.add(t);
    }
}
 
开发者ID:medic,项目名称:javarosa,代码行数:12,代码来源:GeoShapeData.java


示例18: readExternal

import org.javarosa.core.util.externalizable.DeserializationException; //导入依赖的package包/类
public void readExternal(DataInputStream in, PrototypeFactory pf)
		throws IOException, DeserializationException {
	int size = in.readInt();
	if(size != -1) {
		data = new byte[size];
		in.read(data);
	}
	name = ExtUtil.readString(in);
}
 
开发者ID:medic,项目名称:javarosa,代码行数:10,代码来源:BasicDataPointer.java


示例19: readExternal

import org.javarosa.core.util.externalizable.DeserializationException; //导入依赖的package包/类
@Override
public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException,
        DeserializationException {
    len = (int) ExtUtil.readNumeric(in);
    for (int i = 0; i < len; i++) {
        gp[i] = ExtUtil.readDecimal(in);
    }
    // make sure that any old data is removed...
    for (int i = len ; i < gp.length ; ++i ) {
    	this.gp[i] = MISSING_VALUE;
    }
}
 
开发者ID:medic,项目名称:javarosa,代码行数:13,代码来源:GeoPointData.java


示例20: readExternal

import org.javarosa.core.util.externalizable.DeserializationException; //导入依赖的package包/类
@Override
public void readExternal(DataInputStream in, PrototypeFactory pf)
		throws IOException, DeserializationException {
	int length = in.readInt();
	data = new IDataPointer[length];
	for(int i = 0; i < data.length; ++i) {
		data[i] = (IDataPointer)ExtUtil.read(in, new ExtWrapTagged());
	}
}
 
开发者ID:medic,项目名称:javarosa,代码行数:10,代码来源:MultiPointerAnswerData.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TransactionalSpoutCoordinator类代码示例发布时间:2022-05-22
下一篇:
Java ObjectPayload类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap