protected final void abortIfNeeded() {
        if (shouldAbort()) {
            abort();    // execute subclass specific abortion logic
            throw new AbortedException();
        }
    }
Aborts with subclass specific abortion logic executed if needed.
Note the interrupted status of the thread is cleared by this method.
@throws AbortedException if found necessary.
aws-java-sdk-core/src/main/java/com/amazonaws/internal/SdkFilterInputStream.java