parvin parvin - 6 months ago 40
Java Question

jar file for StreamedContent in java

I want to retrieve file from db and display it in datatable in primefaces.
I want to use this code:

public StreamedContent convertFichier(byte[] bytes) {
InputStream is = new ByteArrayInputStream(bytes);
System.out.println("size file : " + bytes.length);
StreamedContent image = new DefaultStreamedContent(is);
System.out.println("dans le convertisseur : " + image.getContentType());
return image;
}


But I don't know what jar file is used for
StreamedContent

Answer

Look at this page and jar file

http://www.primefaces.org/downloads

http://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/5.3/primefaces-5.3.jar

StreamedContent located in this package inside jar above

org.primefaces.model.StreamedContent

You can also download jar with sources from Community download block on page which I specified earlier.

http://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/5.3/primefaces-5.3-sources.jar