Here you can find the source of closeStream(Closeable stream)
Parameter | Description |
---|---|
stream | a parameter |
public static void closeStream(Closeable stream)
//package com.java2s; //License from project: Open Source License import java.io.Closeable; import java.io.IOException; public class Main { public static void closeStream(Closeable stream) { try {/* w ww .j a va2s . c o m*/ if (stream != null) { stream.close(); } } catch (IOException e) { System.out.println("Close IO stream failure."); e.printStackTrace(); } } }