Android InputStream Close closeStreamIgnoreExpection(InputStream stream)

Here you can find the source of closeStreamIgnoreExpection(InputStream stream)

Description

close Stream Ignore Expection

License

Apache License

Declaration

public static void closeStreamIgnoreExpection(InputStream stream) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.InputStream;

public class Main {

    public static void closeStreamIgnoreExpection(InputStream stream) {
        try {// w  ww .  ja v a  2  s  .co m
            if (stream != null) {
                stream.close();
            }
        } catch (Exception e) {
            // do nothing here
        }
    }
}

Related

  1. safeClose(InputStream is)