Here you can find the source of toBufferedWriter(Writer w)
public static BufferedWriter toBufferedWriter(Writer w)
//package com.java2s; //License from project: LGPL import java.io.BufferedWriter; import java.io.Writer; public class Main { public static BufferedWriter toBufferedWriter(Writer w) { if (w instanceof BufferedWriter) return (BufferedWriter) w; return new BufferedWriter(w); }/* w ww .j a va 2s . c om*/ }