Federal agents arrested 114 immigrants in Massachusetts in the past four months amid a nationwide crackdown on street gangs. Most of them were here legally. All but one had a criminal record, federal officials said, and most had been convicted of crimes. Their records include arrests for assault and battery on a police officer, armed carjacking, and drug-related offenses, but not necessarily convictions. "Bottom line is that they're a threat to public safety," said Bruce Foucart, of the US Immigration and Customs Enforcement in Boston. Nationwide, a total of 1,759 people were arrested in 28 states under Operation Community Shield, launched in 2005 and pairing federal agents with state and local authorities.