Java OutputStream Create getOutputStream()

Here you can find the source of getOutputStream()

Description

returns an output stream that will swallow anything it's given.

License

Open Source License

Return

the output stream

Declaration


public static OutputStream getOutputStream() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.OutputStream;

public class Main {
    /**/*from   w w w.  j  a va2  s . c  om*/
     *  returns an output stream that will swallow anything
     *  it's given.
     * 
     *  @return the output stream
     * 
     */

    public static OutputStream getOutputStream() {

        return new OutputStream() {
            public void write(int i) {
            }
        };

    }
}