public static void closeQuietly ( @ Nullable final Socket ... sockets ) { if ( sockets == null ) return ; for ( Socket socket : sockets ) { if ( socket == null ) return ; try { socket . close ( ) ; } catch ( IOException ignored ) { } } }
In JDK 1 . 6 java . net . Socket doesn t implement Closeable so we have this overload .