public static void closeIfNecessary ( Closeable closeable ) throws ODataClientException { if ( closeable != null ) { try { closeable . close ( ) ; } catch ( IOException e ) { throw new ODataClientException ( "Could not close '" + closeable . getClass ( ) . getSimpleName ( ) + "'" , e ) ; } } }
Close closable objects if it is necessary . Mostly used to close connections .