Declare IOException for the API methods.