Java InputStream Close forceClose(Closeable stream)

Here you can find the source of forceClose(Closeable stream)

Description

force Close

License

Apache License

Declaration

public static void forceClose(Closeable stream) 

Method Source Code

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

import java.io.Closeable;

public class Main {
    public static void forceClose(Closeable stream) {
        if (stream != null) {
            try {
                stream.close();//from  ww w  . j a  va2s  .c om
            } catch (Throwable t) {
            }
        }
    }
}

Related

  1. close(InputStream is)
  2. close(InputStream is)
  3. close(InputStream is)
  4. close(InputStream is, boolean success)
  5. close(InputStream is, OutputStream os)
  6. forceClosed(InputStream stream)