Java BufferedWriter Create toBufferedWriter(Writer w)

Here you can find the source of toBufferedWriter(Writer w)

Description

to Buffered Writer

License

LGPL

Declaration

public static BufferedWriter toBufferedWriter(Writer w) 

Method Source Code

//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*/
}

Related

  1. getBufferedWriter(String file, String fileCharset)
  2. getBufferedWriter(String filePath, String encoding)
  3. getBufferedWriter(String path)
  4. getBufferedWriter(String path, String charset, boolean isAppend)
  5. getBufferedWriterOnFile(File file, String format)