public static void safeClose(Writer out) {
        if (out != null) {
            try {
                out.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
Closes the given stream inside a try/catch. Does nothing if stream is null.
argus-apm/argus-apm-main/src/main/java/com/argusapm/android/debug/storage/IOUtil.java