The suspect shouted obscenities at the federal officer, then hurled the sandwich, a court filing says.