Here you can find the source of toBufferedOutputStream(OutputStream os)
public static BufferedOutputStream toBufferedOutputStream(OutputStream os)
//package com.java2s; //License from project: LGPL import java.io.BufferedOutputStream; import java.io.OutputStream; public class Main { public static BufferedOutputStream toBufferedOutputStream(OutputStream os) { if (os instanceof BufferedOutputStream) return (BufferedOutputStream) os; return new BufferedOutputStream(os); }/*w ww.j av a 2 s . c o m*/ }