On SDK<29, this class does not have a close method yet, so the app crashes when using try-with-resources.