  In an earlier paper, we used the absolute grading on Heegaard Floer homology
to give restrictions on knots in $S^3$ which admit lens space surgeries. The
aim of the present article is to exhibit stronger restrictions on such knots,
arising from knot Floer homology. One consequence is that all the non-zero
coefficients of the Alexander polynomial of such a knot are $\pm 1$. This
information in turn can be used to prove that certain lens spaces are not
obtained as integral surgeries on knots. In fact, combining our results with
constructions of Berge, we classify lens spaces $L(p,q)$ which arise as
integral surgeries on knots in $S^3$ with $|p|\leq 1500$. Other applications
include bounds on the four-ball genera of knots admitting lens space surgeries
(which are sharp for Berge's knots), and a constraint on three-manifolds
obtained as integer surgeries on alternating knots, which is closely to related
to a theorem of Delman and Roberts.
