338339340341342343344345346347348
FileInputStream in = new FileInputStream(f); String id = store.writeBlob(in); in.close(); String name = f.substring(parent.length()); listing.key(name).value(id); listing.newline(); } listing.endObject(); String l = listing.toString(); String id = store.writeBlob(new ByteArrayInputStream(l.getBytes("UTF-8"))); return id;
6768697071727374757677
return ""; } } else if (after == null) { buff.tag('-'); buff.value(path); return buff.newline().toString(); } TraversingNodeDiffHandler diffHandler = new TraversingNodeDiffHandler(store) { int levels = depth < 0 ? Integer.MAX_VALUE : depth; @Override
127128129130131132133134135136137
String p = PathUtils.concat(getCurrentPath(), name); if (p.startsWith(pathFilter)) { removedNodes.put(before, p); buff.tag('-'); buff.value(p); buff.newline(); } } @Override public void childNodeChanged(String name, NodeState before, NodeState after) {
144145146147148149150151152153154
super.childNodeChanged(name, before, after); } else { buff.tag('^'); buff.key(p); buff.object().endObject(); buff.newline(); } ++levels; } } };
228229230231232233234235236237238
} String p = PathUtils.concat(getCurrentPath(), name); if (p.startsWith(pathFilter)) { buff.tag('-'); buff.value(p); buff.newline(); } } @Override public void childNodeChanged(String name, NodeState before, NodeState after) {
244245246247248249250251252253254
// recurse super.childNodeChanged(name, before, after); } else { buff.tag('^'); buff.value(p); buff.newline(); } ++levels; } } };
171172173174175176177178179180181
for (String d : children) { jsop.value(d); } jsop.endArray(); jsop.endObject(); jsop.newline(); return jsop.toString(); } @Override public String toString() {
8283848586878889909192
JsopBuilder jsopBuilder = new JsopBuilder(); int numOps = this.random.nextInt(10) + 1; for (int i = 0; i < numOps; ++i) { if (this.createRandomOp(jsopBuilder)) { jsopBuilder.newline(); } else { --i; } }
132133134135136137138139140141142
for (String d : data) { jsop.value(d); } jsop.endArray(); } jsop.newline(); indexer.buffer(jsop.toString()); } void bufferMove(String path, String newPath) { JsopBuilder jsop = new JsopBuilder();
139140141142143144145146147148149
} void bufferMove(String path, String newPath) { JsopBuilder jsop = new JsopBuilder(); jsop.tag('>').key(path).value(newPath); jsop.newline(); indexer.buffer(jsop.toString()); } void bufferDelete(String path) { JsopBuilder jsop = new JsopBuilder();