public final class Closeables
extends java.lang.Object
| Modifier and Type | Method and Description | 
|---|---|
| static void | close(java.nio.channels.Channel channel,
     boolean swallowIOException)Closes Channel and either propagates or swallows exception depending on specified boolean flag. | 
| static void | close(java.io.Closeable closeable,
     boolean swallowIOException)Closes object implementing closeable by either swallowing or propagating IOException depending on flag parameter. | 
| static void | closeQuietly(java.io.Closeable closeable)Closes Closeable and swallows IOException. | 
| static void | closeQuietly(java.io.InputStream inputStream)Closes Input Stream and swallows IOException. | 
public static void close(java.io.Closeable closeable,
                         boolean swallowIOException)
                  throws java.io.IOException
closeable - the closeableswallowIOException - the swallow iO exceptionjava.io.IOException - the iO exceptionpublic static void closeQuietly(java.io.Closeable closeable)
closeable - the input streampublic static void closeQuietly(java.io.InputStream inputStream)
inputStream - the input streampublic static void close(java.nio.channels.Channel channel,
                         boolean swallowIOException)
                  throws java.io.IOException
channel - the channelswallowIOException - the swallow iO exceptionjava.io.IOException - the iO exception