GenericReader: factorize code