Here you can find the source of closeStream(InputStream in)
Parameter | Description |
---|---|
in | a parameter |
public static boolean closeStream(InputStream in)
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class Main { /**/* ww w . j a va 2 s . c o m*/ * * * @param in * * @return */ public static boolean closeStream(InputStream in) { try { if (in != null) { in.close(); } return true; } catch (IOException ioe) { return false; } } /** * * * @param out * * @return */ public static boolean closeStream(OutputStream out) { try { if (out != null) { out.close(); } return true; } catch (IOException ioe) { return false; } } }