Here you can find the source of writeStream(final OutputStream out, final String content, final boolean close)
Parameter | Description |
---|---|
out | where to write to |
content | what to write |
close | whether to close the stream |
protected static void writeStream(final OutputStream out, final String content, final boolean close)
//package com.java2s; import java.io.OutputStream; import java.io.PrintWriter; public class Main { /**/*from w w w .j a v a 2s . c o m*/ * Write a string * * @param out where to write to * @param content what to write * @param close whether to close the stream */ protected static void writeStream(final OutputStream out, final String content, final boolean close) { final PrintWriter writer = new PrintWriter(out); writer.println(content); if (close) { writer.close(); } } }