Java BufferedOutputStream Create toBufferedOutputStream(OutputStream os)

Here you can find the source of toBufferedOutputStream(OutputStream os)

Description

to Buffered Output Stream

License

LGPL

Declaration

public static BufferedOutputStream toBufferedOutputStream(OutputStream os) 

Method Source Code

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

Related

  1. toBuffered(OutputStream stream)
  2. toBufferedDataOutputStream(final OutputStream outputStream)
  3. toBufferedStream(InputStream is)