Package org.wso2.carbon.core.commons.stub.filedownload

Examples of org.wso2.carbon.core.commons.stub.filedownload.FileDownloadServiceStub.downloadFile()


                    getServletContext(), request.getSession());

            String serviceEPR = serverURL + "FileDownloadService";
            try {
                FileDownloadServiceStub stub = new FileDownloadServiceStub(configCtxService.getClientConfigContext(), serviceEPR);
                DataHandler dataHandler = stub.downloadFile(fileID);
                if (dataHandler != null) {
                    InputStream in = dataHandler.getDataSource().getInputStream();
                    int nextChar;
                    while ((nextChar = in.read()) != -1) {
                        out.write((char) nextChar);
View Full Code Here


                if(CarbonUtils.isRunningOnLocalTransportMode()) {
                    stub = new FileDownloadServiceStub(configCtxService.getServerConfigContext(), serviceEPR);
                } else {
                    stub = new FileDownloadServiceStub(configCtxService.getClientConfigContext(), serviceEPR);
                }
                DataHandler dataHandler = stub.downloadFile(fileID);
                if (dataHandler != null) {
                    response.setHeader("Content-Disposition", "filename=" + fileID);
                    response.setContentType(dataHandler.getContentType());
                    InputStream in = dataHandler.getDataSource().getInputStream();
                    int nextChar;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.