Paris Hilton -- BF's Attacker Sentenced to JAIL!

4/28/2011 2:00 PM PDT

Paris Hilton -- BF's Attacker Sentenced to JAIL!

The guy who attacked Paris Hilton's boyfriend outside an L.A. courthouse yesterday just got SMACKED by the judge -- and will spend the next 227 days behind bars.

Earlier today, James Rainford pled no contest to misdemeanor battery for allegedly smacking Cy Waits in the back of the head as the couple walked into the Van Nuys Courthouse.

Rainford was already on probation stemming from an incident at Hilton's pad last year -- and today, the judge threw the book at him.

In addition to the jail time, Rainford was sentenced to three years informal probation and ordered to stay away from Waits once he's released.