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


Java AbstractHessianInput类代码示例

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


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

示例1: readMap

import com.caucho.hessian.io.AbstractHessianInput; //导入依赖的package包/类
@Override
public Object readMap(AbstractHessianInput in) throws IOException {
	int ref = in.addRef(null);

	String direction = null, property = null, nullHandling = null;
	boolean isIgnoreCase = false;

	while (!in.isEnd()) {
		String key = in.readString();

		if (key.equals("value"))
			direction = in.readString();
		else
			in.readString();
	}

	in.readMapEnd();

	Object value = create(direction, property, isIgnoreCase, nullHandling);

	in.setRef(ref, value);

	return value;
}
 
开发者ID:5waynewang,项目名称:commons-jkit,代码行数:25,代码来源:OrderDeserializer.java

示例2: readMap

import com.caucho.hessian.io.AbstractHessianInput; //导入依赖的package包/类
@Override
public Object readMap(AbstractHessianInput in) throws IOException {
	String value = null;

	while (!in.isEnd()) {
		String key = in.readString();

		if (key.equals("value"))
			value = in.readString();
		else
			in.readObject();
	}

	in.readMapEnd();

	Object object = create(value);

	in.addRef(object);

	return object;
}
 
开发者ID:5waynewang,项目名称:commons-jkit,代码行数:22,代码来源:StringValueDeserializer.java

示例3: readObject

import com.caucho.hessian.io.AbstractHessianInput; //导入依赖的package包/类
@Override
public Object readObject(AbstractHessianInput in, Object[] fieldNames) throws IOException {
	String value = null;

	for (int i = 0; i < fieldNames.length; i++) {
		if ("value".equals(fieldNames[i]))
			value = in.readString();
		else
			in.readObject();
	}

	Object object = create(value);

	in.addRef(object);

	return object;
}
 
开发者ID:5waynewang,项目名称:commons-jkit,代码行数:18,代码来源:StringValueDeserializer.java

示例4: readMap

import com.caucho.hessian.io.AbstractHessianInput; //导入依赖的package包/类
public Object readMap(AbstractHessianInput in) throws IOException {
    String name = null;

    while (!in.isEnd()) {
        String key = in.readString();

        if (key.equals("name")) {
            name = in.readString();
        }
        else {
            in.readObject();
        }
    }

    in.readMapEnd();

    Object obj = transcriptionParams.contains(TranscribableParams.EnumsWrittenAsStrings) ? name : create(name);

    in.addRef(obj);

    return obj;
}
 
开发者ID:betfair,项目名称:cougar,代码行数:23,代码来源:TranscribableEnumDeserializer.java

示例5: readObject

import com.caucho.hessian.io.AbstractHessianInput; //导入依赖的package包/类
@Override
public Object readObject(AbstractHessianInput in, Object[] fields) throws IOException {
    String[] fieldNames = (String[]) fields;
    String name = null;

    for (int i = 0; i < fieldNames.length; i++) {
        if ("name".equals(fieldNames[i])) {
            name = in.readString();
        }
        else {
            in.readObject();
        }
    }

    Object obj = create(name);

    in.addRef(obj);

    return obj;
}
 
开发者ID:betfair,项目名称:cougar,代码行数:21,代码来源:TranscribableEnumDeserializer.java

示例6: readObject

import com.caucho.hessian.io.AbstractHessianInput; //导入依赖的package包/类
@Override
public Object readObject(final AbstractHessianInput in, Object[] fields) throws IOException {

	try {

		TranscriptionInput ti = new TranscriptionInput() {

			@Override
			public <T> T readObject(Parameter param, boolean client) throws Exception {
				return (T) in.readObject();
			}
		};

		int ref = in.addRef(null);

           FaultDetail o = transcribe(ti);
           in.setRef(ref, o);

		return o;
	}
	catch (Exception e) {
		throw new IOException(e);
	}

}
 
开发者ID:betfair,项目名称:cougar,代码行数:26,代码来源:FaultDetailDeserialiser.java

示例7: readMap

import com.caucho.hessian.io.AbstractHessianInput; //导入依赖的package包/类
@Override
public Object readMap(AbstractHessianInput in) throws IOException {
	int ref = in.addRef(null);

	String key = in.readString();
	if (StringUtils.isEmpty(key)) {
		throw new IOException("Expected string comprising 'value'");
	}

	String value = in.readString();
	Object obj = create(value);

	in.readMapEnd();
	in.setRef(ref, obj);

	return obj;
}
 
开发者ID:MaddHacker,项目名称:serialization-common,代码行数:18,代码来源:AbstractJodaDeserializer.java

示例8: readObject

import com.caucho.hessian.io.AbstractHessianInput; //导入依赖的package包/类
@Override
public Object readObject(AbstractHessianInput in, Object[] fields) throws IOException {
	String[] fieldNames = (String[]) fields;

	int ref = in.addRef(null);

	String value = null;

	for (int i = 0; i < fieldNames.length; i++) {
		String key = fieldNames[i];

		if (key.equals("value")) {
			value = in.readString();
		} else {
			in.readObject();
		}
	}

	Object obj = create(value);

	in.setRef(ref, value);

	return obj;
}
 
开发者ID:MaddHacker,项目名称:serialization-common,代码行数:25,代码来源:AbstractJodaDeserializer.java

示例9: getHessianInput

import com.caucho.hessian.io.AbstractHessianInput; //导入依赖的package包/类
public AbstractHessianInput getHessianInput(InputStream is)
{
  AbstractHessianInput in = new HessianInput(is);
  in.setRemoteResolver(getRemoteResolver());

  return in;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:8,代码来源:HessianProxyFactory.java

示例10: unmarshal

import com.caucho.hessian.io.AbstractHessianInput; //导入依赖的package包/类
/**
 * {@inheritDoc}
 *
 * @see marshalsec.MarshallerBase#unmarshal(java.lang.Object)
 */
@Override
public Object unmarshal ( byte[] data ) throws Exception {
    ByteArrayInputStream bis = new ByteArrayInputStream(data);
    AbstractHessianInput in = createInput(bis);
    return in.readObject();
}
 
开发者ID:mbechler,项目名称:marshalsec,代码行数:12,代码来源:HessianBase.java

示例11: deserialize

import com.caucho.hessian.io.AbstractHessianInput; //导入依赖的package包/类
@Override
public Object deserialize(byte[] bytes) throws Exception {
    if(null == bytes || bytes.length == 0) {
        return null;
    }
    ByteArrayInputStream inputStream=new ByteArrayInputStream(bytes);
    AbstractHessianInput input=new Hessian2Input(inputStream);
    input.setSerializerFactory(serializerFactory);
    Object obj=input.readObject();
    input.close();
    return obj;
}
 
开发者ID:hailin0,项目名称:pagecache-parent,代码行数:13,代码来源:HessianSerializer.java

示例12: deserialize

import com.caucho.hessian.io.AbstractHessianInput; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public static <O> O deserialize(byte[] buf) throws IOException {
	final ByteArrayInputStream is = new ByteArrayInputStream(buf);
	final AbstractHessianInput input = getAndCreateInput(is);
	try {
		return (O) input.readObject();
	}
	finally {
		try {
			is.close();
		}
		catch (IOException ignore) {
		}
	}
}
 
开发者ID:5waynewang,项目名称:commons-jkit,代码行数:16,代码来源:Hessian2Serialization.java

示例13: readMap

import com.caucho.hessian.io.AbstractHessianInput; //导入依赖的package包/类
@Override
public Object readMap(AbstractHessianInput in) throws IOException {
	int ref = in.addRef(null);

	int page = 0, size = 0;
	Sort sort = null;

	while (!in.isEnd()) {
		String key = in.readString();

		if (key.equals("value")) {
			page = in.readInt();
			size = in.readInt();
			sort = (Sort) in.readObject();
		}
		else {
			in.readObject();
		}
	}

	in.readMapEnd();

	Object value = create(page, size, sort);

	in.setRef(ref, value);

	return value;
}
 
开发者ID:5waynewang,项目名称:commons-jkit,代码行数:29,代码来源:PageableDeserializer.java

示例14: readObject

import com.caucho.hessian.io.AbstractHessianInput; //导入依赖的package包/类
@Override
public Object readObject(AbstractHessianInput in, Object[] fields) throws IOException {
	String[] fieldNames = (String[]) fields;

	int ref = in.addRef(null);

	int page = 0, size = 0;
	Sort sort = null;

	for (int i = 0; i < fieldNames.length; i++) {
		String key = fieldNames[i];

		if (key.equals("value")) {
			page = in.readInt();
			size = in.readInt();
			sort = (Sort) in.readObject();
		}
		else {
			in.readObject();
		}
	}

	Object value = create(page, size, sort);

	in.setRef(ref, value);

	return value;
}
 
开发者ID:5waynewang,项目名称:commons-jkit,代码行数:29,代码来源:PageableDeserializer.java

示例15: readObject

import com.caucho.hessian.io.AbstractHessianInput; //导入依赖的package包/类
@Override
public Object readObject(AbstractHessianInput in, Object[] fields) throws IOException {
	String[] fieldNames = (String[]) fields;

	int ref = in.addRef(null);

	String direction = null, property = null, nullHandling = null;
	boolean isIgnoreCase = false;

	for (int i = 0; i < fieldNames.length; i++) {
		String key = fieldNames[i];

		if (key.equals("value")) {
			direction = in.readString();
			property = in.readString();
			isIgnoreCase = in.readBoolean();
			nullHandling = in.readString();
		}
		else {
			in.readObject();
		}
	}

	Object value = create(direction, property, isIgnoreCase, nullHandling);

	in.setRef(ref, value);

	return value;
}
 
开发者ID:5waynewang,项目名称:commons-jkit,代码行数:30,代码来源:OrderDeserializer.java


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