Java Stream Close closeStream(Closeable stream)

Here you can find the source of closeStream(Closeable stream)

Description

close Stream

License

Apache License

Declaration

public static void closeStream(Closeable stream) 

Method Source Code


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

import java.io.Closeable;
import java.io.IOException;

public class Main {
    public static void closeStream(Closeable stream) {
        try {/*from w  w  w .  j a  v a  2  s.com*/
            stream.close();
        } catch (IOException e) {
            throw new IllegalArgumentException(stream + " can not close", e);
        }
    }
}

Related

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