My boar Marvin did this to me once he was fully grown. If you put your piggy down again as soon as he bites you, he learns the lesson - if I bite, I get what I want (in this case to be left alone). So if I got bitten, I just played brave and continued to handle him, probably even more than if he hadnt nipped. So he learnt that nipping wouldnt get him ANYWHERE, so eventually he stopped.
If he is actually taking chunks out or drawing blood, and not just nipping, then put gloves on as suggested previously and keep handling him. He will still learn the lesson that biting doesnt make a difference, as in: you wont put him back into the cage no matter how hard he nips.
good luck!