public static ByteSource bytes(InputStream stream) {
            return new SimpleByteSource(stream);
        }
Returns a new {@code ByteSource} instance representing the specified InputStream's bytes.

@param stream the InputStream to represent as a {@code ByteSource} instance.
@return a new {@code ByteSource} instance representing the specified InputStream's bytes.
src/main/java/org/apache/shiro/lang/util/ByteSource.java