You can do it both ways, however, if you pay the taxes out the money rolled over and are under 59 1/2 you will have a 10% early withdrawal penalty on that portion, as it would then be a withdrawal and a rollover.
One option you may want to consider is rolling over some each year, to avoid a large tax bite. So maybe 20% a year for 5 years.