Code example for Closer

Methods: close

    public final void completed(V result, A attachment)
        try { 
            onSuccess(result, attachment);
            _completionHandler.completed(result, attachment);
        } catch (Throwable t) {
            fail(t, attachment);
    public final void failed(Throwable exc, A attachment)
        /* This weird looking code is to fulfill the contract of Closer. 
         * It ensures that suppressed exceptions from the Closeables are 
         * handled correctly. 
Connect your IDE to all the code out there  Get Codota for Java