Java InputStream Close close(InputStream is, OutputStream os)

Here you can find the source of close(InputStream is, OutputStream os)

Description

close

License

Apache License

Declaration

private static void close(InputStream is, OutputStream os) 

Method Source Code


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

import java.io.*;

public class Main {
    private static void close(InputStream is, OutputStream os) {
        if (is != null)
            try {
                is.close();/*from  www  .j a v  a2  s.  c  om*/
            } catch (IOException e) {
            }
        if (os != null)
            try {
                os.close();
            } catch (IOException e) {
            }
    }
}

Related

  1. close(InputStream is)
  2. close(InputStream is)
  3. close(InputStream is)
  4. close(InputStream is)
  5. close(InputStream is, boolean success)
  6. forceClose(Closeable stream)
  7. forceClosed(InputStream stream)