Here you can find the source of closeOutput(OutputStream stream)
Parameter | Description |
---|---|
stream | non-null; the stream to close |
static public void closeOutput(OutputStream stream)
//package com.java2s; // the rights to use, copy, modify, merge, publish, distribute, sublicense, import java.io.IOException; import java.io.OutputStream; public class Main { /**//from ww w .jav a2s.c o m * Close the given output stream. * * @param stream non-null; the stream to close */ static public void closeOutput(OutputStream stream) { if (stream == System.out) { return; } try { stream.close(); } catch (IOException ex) { throw new RuntimeException("trouble closing stream: " + stream, ex); } } }