I have a Java-Server with an open websocket connection to the javascript client. I want to transfer a binary file from the java server to the javascript client so that the user just has to save the file somewhere in the filesystem.
On client side I could easily handle a Blob.
On server side I have a java.io.File and a javax.websocket.Session.
I could simply write to the javax.websocket.Session.getBasicRemote().getSendStream()
.
Does anyone have such an example or can tell me if I am right and what I have to do on client side?