In PrimeFaces 8.0 the DefaultStreamedContent
cannot be initialized like new DefaultStreamedContent(inputStream, contentType, name)
because it has been deprecated, instead you shound use DefaultStreamedContent.builder()
.
Although while doing .stream()
it asks for a SerializableSupplier<InputStream>
instead of an InputStream
like in the version before 8.0.
DefaultStreamedContent.builder().contentType(contentType).name(name).stream(is).build();
^^
How can I convert a InputStream
to a SerializableSupplier
?