Java Stream Close closeInputStream(InputStream stream)

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

Description

close Input Stream

License

Apache License

Declaration

public static void closeInputStream(InputStream stream) 

Method Source Code


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

import java.io.*;

public class Main {
    public static void closeInputStream(InputStream stream) {
        if (stream != null) {
            try {
                stream.close();/*from  ww w  .java2s .c  o m*/
            } catch (IOException ex) {
                ex.printStackTrace();
            } catch (Throwable ex) {
                ex.printStackTrace();
            }
        }
    }
}

Related

  1. closeInputStream(DataInputStream di)
  2. closeInputStream(InputStream in)
  3. closeInputStream(InputStream inp)
  4. closeInputStream(InputStream inputStream)
  5. closeInputStream(InputStream inputStream)
  6. closeJMXConnection()
  7. closeKeyMap(BufferedReader in)
  8. closeLog()
  9. closeLog()