Java Stream Close closeStream(Closeable... closeable)

Here you can find the source of closeStream(Closeable... closeable)

Description

close Stream

License

Apache License

Declaration

public static void closeStream(Closeable... closeable) 

Method Source Code


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

import java.io.*;

public class Main {
    public static void closeStream(Closeable... closeable) {
        for (Closeable c : closeable) {
            if (c != null) {
                try {
                    c.close();/*w  w  w.j  av a  2s  . c  o  m*/
                } catch (IOException ignored) {
                }
            }
        }
    }
}

Related

  1. closeStream(Closeable aStream)
  2. closeStream(Closeable closeable)
  3. closeStream(Closeable closeable)
  4. closeStream(Closeable stream)
  5. closeStream(Closeable stream)
  6. closeStream(Closeable... streams)
  7. closeStream(FileInputStream in)
  8. closeStream(final Closeable stream)
  9. closeStream(final InputStream in)