New South Wales prison guards will take industrial action on Friday after one of their Newcastle colleagues was given a jail sentence for assaulting an inmate.

Terry Dolling assaulted the inmate in a Newcastle Court cell, after the Hepatitis C-infected man spat on his face in October last year.

Toronto Local Court Magistrate Jennifer Atkinson said while prison officers are exposed to terrible behaviour, they do not have the right to take matters into their own hands.

She said Dolling abused his position of trust when he repeatedly punched the inmate.

Dolling was sentenced to seven months jail with four months non-parole, prompting some of his colleagues to storm out of the court room.

Matt Bindley, from the prison officers vocation branch, says he is in shock.

"It was like time stood still and we were in a horror movie except the unfortunate thing about it - it was reality," he said.

"Today we're going through a terrible time and we'll stand beside our brotherhood all the way, and we'll be there for as long as he needs until this nightmare is over."

It is understood Dolling is against his colleagues going on strike, but union officials say there will be some form of state-wide industrial action.

Dolling is on bail, ahead of an appeal.