BitCodec<InsertBase> codec = new BitCodec<InsertBase>() {
@Override
public InsertBase read(BitInputStream bis) throws IOException {
InsertBase ib = new InsertBase();
ib.setBase(baseCodec.read(bis));
return ib;
}
@Override
public long write(BitOutputStream bos, InsertBase ib)
throws IOException {
return baseCodec.write(bos, ib.getBase());
}
@Override
public long numberOfBits(InsertBase ib) {
return baseCodec.numberOfBits(ib.getBase());
}
};
DefaultMutableTreeNode node = buildNode(codec, "Single insertion codec");
parent.add(node);