binarystream

binary serialization, adding a new field to class - will it work?

我的未来我决定 提交于 2019-12-01 05:03:22
问题 I have a client and a server application which communicate over .NET 2.0 Remoting using binary serialization. A small change has been made to one of the data transfer object's interface and the implementing class, well, an array of strings field was added. If I to redeploy a new version of server application, will my old clients continue to work? I would think they would, since nothing has been deleted from interface and direct implementation, but I am not sure. It probably boils down to

Is it possible to download a binary file from JSP?

你。 提交于 2019-11-28 10:46:32
问题 I think is it quite possible, but I'm not sure. I don't have the possibility to use servlet directly, so I'm forced to use JSP ( long history, short time, you don't want to hear ) So I think something like the following will do: // PSEUDO-CODE: // source.jsp Download your file <a href="file.jsp?xyz">MyDocument.doc</a> // file.jsp <%@page content-type="applicaton/somethig-binary-xyz"%> byte[] data = getBinaryFromSomeWhere(); int start = 0; int end = data.length < 1024 ? data.length : 1024; int