Java tutorial
//package com.java2s; import java.io.IOException; import java.io.InputStream; public class Main { /** * close inputStream * * @param s */ private static void closeInputStream(InputStream s) { if (s == null) { return; } try { s.close(); } catch (IOException e) { throw new RuntimeException("IOException occurred. ", e); } } }