本文整理汇总了Java中org.apache.jute.Index类的典型用法代码示例。如果您正苦于以下问题:Java Index类的具体用法?Java Index怎么用?Java Index使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Index类属于org.apache.jute包,在下文中一共展示了Index类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: deserialize
import org.apache.jute.Index; //导入依赖的package包/类
public void deserialize(InputArchive archive, String tag)
throws IOException {
archive.startRecord("node");
data = archive.readBuffer("data");
Index i = archive.startVector("acl");
if (i != null) {
acl = new ArrayList<ACL>();
while (!i.done()) {
ACL a = new ACL();
a.deserialize(archive, "aclEntry");
acl.add(a);
i.incr();
}
}
archive.endVector("acl");
stat = new StatPersistedV1();
stat.deserialize(archive, "stat");
archive.endRecord("node");
}
示例2: deserialize
import org.apache.jute.Index; //导入依赖的package包/类
public synchronized void deserialize(InputArchive ia) throws IOException {
clear();
int i = ia.readInt("map");
while (i > 0) {
Long val = ia.readLong("long");
if (aclIndex < val) {
aclIndex = val;
}
List<ACL> aclList = new ArrayList<ACL>();
Index j = ia.startVector("acls");
while (!j.done()) {
ACL acl = new ACL();
acl.deserialize(ia, "acl");
aclList.add(acl);
j.incr();
}
longKeyMap.put(val, aclList);
aclKeyMap.put(aclList, val);
referenceCounter.put(val, new AtomicLongWithEquals(0));
i--;
}
}
示例3: deserializeList
import org.apache.jute.Index; //导入依赖的package包/类
private void deserializeList(Map<Long, List<ACL>> longKeyMap,
InputArchive ia) throws IOException {
int i = ia.readInt("map");
while (i > 0) {
Long val = ia.readLong("long");
if (aclIndex < val) {
aclIndex = val;
}
List<ACL> aclList = new ArrayList<ACL>();
Index j = ia.startVector("acls");
while (!j.done()) {
ACL acl = new ACL();
acl.deserialize(ia, "acl");
aclList.add(acl);
j.incr();
}
longKeyMap.put(val, aclList);
aclKeyMap.put(aclList, val);
i--;
}
}
示例4: deserializeList
import org.apache.jute.Index; //导入依赖的package包/类
private void deserializeList(Map<Long, List<ACL>> longKeyMap,
InputArchive ia) throws IOException {
int i = ia.readInt("map");
while (i > 0) {
Long val = ia.readLong("long");
if (aclIndex < val) {
aclIndex = val;
}
List<ACL> aclList = new ArrayList<ACL>();
Index j = ia.startVector("acls");
while (!j.done()) {
ACL acl = new ACL();
acl.deserialize(ia, "acl");
aclList.add(acl);
j.incr();
}
longKeyMap.put(val, aclList);
aclKeyMap.put(aclList, val);
i--;
}
}
示例5: deserializeList
import org.apache.jute.Index; //导入依赖的package包/类
private void deserializeList(Map<Long, List<ACL>> longKeyMap,
InputArchive ia) throws IOException {
// longKey数量
int i = ia.readInt("map");
while (i > 0) {
Long val = ia.readLong("long");
if (aclIndex < val) {
aclIndex = val;
}
List<ACL> aclList = new ArrayList<ACL>();
// acl列表数量
Index j = ia.startVector("acls");
while (!j.done()) {
ACL acl = new ACL();
// 反序列化acl
acl.deserialize(ia, "acl");
aclList.add(acl);
j.incr();
}
longKeyMap.put(val, aclList);
aclKeyMap.put(aclList, val);
i--;
}
}
示例6: startVector
import org.apache.jute.Index; //导入依赖的package包/类
@Override
public Index startVector(String tag) throws IOException {
int len = readInt(tag);
if (len == -1) {
return null;
}
return new BufferIndex(len);
}
示例7: startMap
import org.apache.jute.Index; //导入依赖的package包/类
@Override
public Index startMap(String tag) throws IOException {
return new BufferIndex(readInt(tag));
}