Code example for Flushable

Methods: flush

0
	} 
 
	public static void safeFlush(Flushable fa) {
		if (null != fa)
			try { 
				fa.flush();
			} 
			catch (IOException e) {}
	} 
 
	/** 
	 * 为一个输入流包裹一个缓冲流。如果这个输入流本身就是缓冲流,则直接返回 
	 *  
	 * @param ins 
	 *            输入流。 
	 * @return 缓冲输入流 
	 */ 
	public static BufferedInputStream buff(InputStream ins) {
		if (ins instanceof BufferedInputStream)
			return (BufferedInputStream) ins;
		return new BufferedInputStream(ins);