Java InputStream Close close(InputStream in, OutputStream out)

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

Description

close

License

Apache License

Declaration

public static void close(InputStream in, OutputStream out) 

Method Source Code

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

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

public class Main {

    public static void close(InputStream in, OutputStream out) {
        try {//from   ww  w  . j av  a 2  s.  co  m
            if (in != null) {
                in.close();
            }
            if (out != null) {
                out.close();
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

Related

  1. close(InputStream in)
  2. close(InputStream in)
  3. close(InputStream in)
  4. close(InputStream in)
  5. close(InputStream in, boolean silent)
  6. close(InputStream input)
  7. close(InputStream inputStream)
  8. close(InputStream inputstream)
  9. close(InputStream inputStream)