Man arrested, charged for exposing himself inside library