Java InputStream Close close(InputStream in)

Here you can find the source of close(InputStream in)

Description

close

License

Open Source License

Declaration

public static void close(InputStream in) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.*;

public class Main {
    public static void close(Reader in) {
        try {//from  ww  w.  j a  v a 2 s  . c  o m
            in.close();
        } catch (Exception x) {
            // ignore
        }
    }

    public static void close(Writer out) {
        try {
            out.close();
        } catch (Exception x) {
            // ignore
        }
    }

    public static void close(InputStream in) {
        try {
            in.close();
        } catch (Exception x) {
            // ignore
        }
    }

    public static void close(OutputStream os) {
        try {
            os.close();
        } catch (Exception x) {
            // no op
        }
    }
}

Related

  1. close(InputStream closeable)
  2. close(InputStream in)
  3. close(InputStream in)
  4. close(InputStream in)
  5. close(InputStream in)
  6. close(InputStream in)
  7. close(InputStream in)
  8. close(InputStream in)
  9. close(InputStream in)