Code example for Flushable

Methods: flush

0
     * @param flushable 可刷新对象 
     */ 
    public static void safeFlush(Flushable flushable) {
        if (null != flushable) {
            try { 
                flushable.flush();
            } catch (IOException ignored) {
            } 
        } 
    } 
 
    /** 
     * 关闭一个可关闭对象 
     * 
     * @param closeable 可关闭对象 
     * @return 是否成功关闭 
     */ 
    public static boolean safeClose(Closeable closeable) {
        if (null != closeable) {
            try { 
                closeable.close();