Here you can find the source of closeStream(Closeable closeable)
Parameter | Description |
---|---|
closeable | closeable |
Parameter | Description |
---|---|
IOException | an exception |
public static void closeStream(Closeable closeable) throws IOException
//package com.java2s; /*//from www . j a v a 2 s .c o m * Copyright (C) 2010 Viettel Telecom. All rights reserved. * VIETTEL PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ import java.io.Closeable; import java.io.IOException; public class Main { /** * check null and Close a stream * * @param closeable closeable * @throws IOException */ public static void closeStream(Closeable closeable) throws IOException { if (closeable != null) { closeable.close(); } } }