View Full Version : Working sample code for implementing a web service download method

09-30-2012, 10:28 AM
I had tried to implement such a download method but failed. I referred to the section "Hessian with large binary data" on document page http://hessian.caucho.com/doc/hessian-overview.xtp.

// file download API
public interface Download {
public InputStream download(String filename, InputStream data);

// Download Java Code
InputStream is = fileProxy.download("test.xml");

try {
... // read data here
} finally {

The number of arguments of method download is not the same. Why?

What is the 2nd argument, InputStream data, used for? Why is it needed?