本文整理汇总了Java中org.apache.tinkerpop.shaded.kryo.io.Input.readString方法的典型用法代码示例。如果您正苦于以下问题:Java Input.readString方法的具体用法?Java Input.readString怎么用?Java Input.readString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.tinkerpop.shaded.kryo.io.Input
的用法示例。
在下文中一共展示了Input.readString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readName
import org.apache.tinkerpop.shaded.kryo.io.Input; //导入方法依赖的package包/类
protected Registration readName(final Input input) {
final int nameId = input.readVarInt(true);
if (nameIdToClass == null) nameIdToClass = new IntMap<>();
Class type = nameIdToClass.get(nameId);
if (type == null) {
// Only read the class name the first time encountered in object graph.
final String className = input.readString();
type = getTypeByName(className);
if (type == null) {
try {
type = Class.forName(className, false, kryo.getClassLoader());
} catch (ClassNotFoundException ex) {
throw new KryoException("Unable to find class: " + className, ex);
}
if (nameToClass == null) nameToClass = new ObjectMap<>();
nameToClass.put(className, type);
}
nameIdToClass.put(nameId, type);
}
return kryo.getRegistration(type);
}
示例2: read
import org.apache.tinkerpop.shaded.kryo.io.Input; //导入方法依赖的package包/类
@Override
public JsonBuilder read(final Kryo kryo, final Input input, final Class<JsonBuilder> jsonBuilderClass) {
final String jsonString = input.readString();
return new JsonBuilder(slurper.parseText(jsonString));
}
示例3: read
import org.apache.tinkerpop.shaded.kryo.io.Input; //导入方法依赖的package包/类
@Override
public ORecordId read(final Kryo kryo, final Input input, final Class<ORecordId> tinkerGraphClass) {
return new ORecordId(input.readString());
}