Here you can find the source of closeRelaxed(Closeable resource)
Parameter | Description |
---|---|
resource | The resource to be closed. |
public static void closeRelaxed(Closeable resource)
//package com.java2s; //License from project: Open Source License import java.io.Closeable; import java.io.IOException; public class Main { /**/* w w w .j ava2s . co m*/ * Close the given resource relaxed. * * @param resource The resource to be closed. */ public static void closeRelaxed(Closeable resource) { if (resource != null) { try { resource.close(); } catch (IOException ignore) { // Ignored by definition } } } }