core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/internal/signer/io/SdkLengthAwareInputStream.java [70:106]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        return read;
    }

    @Override
    public long skip(long requestedBytesToSkip) throws IOException {
        requestedBytesToSkip = Math.min(requestedBytesToSkip, remaining);
        long skippedActual = super.skip(requestedBytesToSkip);
        remaining -= skippedActual;
        return skippedActual;
    }

    @Override
    public int available() throws IOException {
        int streamAvailable = super.available();
        return Math.min(streamAvailable, saturatedCast(remaining));
    }

    @Override
    public void mark(int readlimit) {
        super.mark(readlimit);
        // mark() causes reset() to change the stream's position back to the current position. Therefore, when reset() is called,
        // the new length of the stream will be equal to the current value of 'remaining'.
        length = remaining;
    }

    @Override
    public void reset() throws IOException {
        super.reset();
        remaining = length;
    }

    public long remaining() {
        return remaining;
    }

    private boolean hasMoreBytes() {
        return remaining > 0;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/io/SdkLengthAwareInputStream.java [87:123]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        return read;
    }

    @Override
    public long skip(long requestedBytesToSkip) throws IOException {
        requestedBytesToSkip = Math.min(requestedBytesToSkip, remaining);
        long skippedActual = super.skip(requestedBytesToSkip);
        remaining -= skippedActual;
        return skippedActual;
    }

    @Override
    public int available() throws IOException {
        int streamAvailable = super.available();
        return Math.min(streamAvailable, saturatedCast(remaining));
    }

    @Override
    public void mark(int readlimit) {
        super.mark(readlimit);
        // mark() causes reset() to change the stream's position back to the current position. Therefore, when reset() is called,
        // the new length of the stream will be equal to the current value of 'remaining'.
        length = remaining;
    }

    @Override
    public void reset() throws IOException {
        super.reset();
        remaining = length;
    }

    public long remaining() {
        return remaining;
    }

    private boolean hasMoreBytes() {
        return remaining > 0;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



