private byte[] containerToStream(OIndexRIDContainer object) {
StringBuilder iOutput = new StringBuilder();
iOutput.append(OStringSerializerHelper.LINKSET_PREFIX);
object.checkNotEmbedded();
final OIndexRIDContainerSBTree tree = ((OIndexRIDContainerSBTree) object.getUnderlying());
final ODocument document = new ODocument();
document.field("rootIndex", tree.getRootPointer().getPageIndex());
document.field("rootOffset", tree.getRootPointer().getPageOffset());
document.field("file", tree.getName());
iOutput.append(new String(document.toStream()));
iOutput.append(OStringSerializerHelper.SET_END);
return iOutput.toString().getBytes();
}