Whosoever--
assaults any person with intent to commit a serious indictable offence, or
assaults, resists, or wilfully obstructs any officer while in the execution of his or her duty, such officer being a constable, or other peace officer, custom-house officer, prison officer, sheriff's officer, or bailiff, or any person acting in aid of such officer, or
assaults any person, with intent to resist or prevent the lawful apprehension or detainer of any person for any offence,shall be liable to imprisonment for 5 years.