{
TupleCursor<K, V> cursor = browse();
if ( keySerializer == null )
{
throw new MissingSerializerException( "Cannot flush the btree without a Key serializer" );
}
if ( valueSerializer == null )
{
throw new MissingSerializerException( "Cannot flush the btree without a Value serializer" );
}
// Write the number of elements first
bb.putLong( getBtreeHeader().getNbElems() );