Here you can find the source of closeStreams(InputStream src, OutputStream dest)
Parameter | Description |
---|---|
src | The InputStream to close. |
dest | The OutputStream to close. |
private static void closeStreams(InputStream src, OutputStream dest)
//package com.java2s; //License from project: Apache License import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class Main { /**/*from w w w.j av a 2 s . c o m*/ * Closes the streams and reports Exceptions to System.err * @param src The InputStream to close. * @param dest The OutputStream to close. */ private static void closeStreams(InputStream src, OutputStream dest) { try { src.close(); } catch (IOException e) { e.printStackTrace(); } try { dest.close(); } catch (IOException e) { e.printStackTrace(); } } }