US rapper Lil Wayne has been jailed in New York for a year.