The PartialContentInputStream was a minimal implementation that worked
well when used directly with the spring byte-range support.
However, using the InputStream variant in any other place (like wrapping it for decryption),
the minimal implementation breaks down, requiring workarounds when
handling the encryption.
Using an implementation that is fully compliant with the InputStream
specifications makes implementation of a wrapping InputStream easier,
as no special provisions need to be made for a read method that
immediately reads the byte-range (instead of empty space before the start of the byte-range)
The PartialContentInputStream was a minimal implementation that worked well when used directly with the spring byte-range support.
However, using the InputStream variant in any other place (like wrapping it for decryption), the minimal implementation breaks down, requiring workarounds when handling the encryption. Using an implementation that is fully compliant with the InputStream specifications makes implementation of a wrapping InputStream easier, as no special provisions need to be made for a read method that immediately reads the byte-range (instead of empty space before the start of the byte-range)