} else {
child = new ZChildren(path, ui.getAbsolutePath().toString(),
childTemplate, children);
}
return Response.status(Response.Status.OK).entity(
new JSONWithPadding(child, callback)).build();
} else {
Stat stat = new Stat();
byte[] data = zk.getData(path, false, stat);
byte[] data64;
String dataUtf8;
if (data == null) {
data64 = null;
dataUtf8 = null;
} else if (!dataformat.equals("utf8")){
data64 = data;
dataUtf8 = null;
} else {
data64 = null;
dataUtf8 = new String(data);
}
ZStat zstat = new ZStat(path, ui.getAbsolutePath().toString(),
data64, dataUtf8, stat.getCzxid(),
stat.getMzxid(), stat.getCtime(), stat.getMtime(),
stat.getVersion(), stat.getCversion(),
stat.getAversion(), stat.getEphemeralOwner(),
stat.getDataLength(), stat.getNumChildren(),
stat.getPzxid());
return Response.status(Response.Status.OK).entity(
new JSONWithPadding(zstat, callback)).build();
}
}