Added an InputStream utility for intentional truncation at some limit.