Here you can find the source of getOutputStream()
public static OutputStream getOutputStream()
//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) { } }; } }