Examples of streamBinaryTo()


Examples of org.exist.xquery.value.BinaryValue.streamBinaryTo()

               
                final BinaryValue binaryValue = (BinaryValue)typedValue.getValue();
                OutputStream os = null;
                try {
                    os = response.getOutputStream();
                    binaryValue.streamBinaryTo(os);
                } catch(final IOException ioe) {
                    throw new RestXqServiceException("Error while serializing binary: " + ioe.toString(), ioe);
                } finally {
                    if(os != null) {
                        try {
View Full Code Here

Examples of org.exist.xquery.value.BinaryValue.streamBinaryTo()

            response.setHeader("Content-Disposition", "inline; filename=\"" + filename + "\"");
        }

        try {
            final OutputStream os = response.getOutputStream();
            binary.streamBinaryTo(response.getOutputStream());
            os.close();

            //commit the response
            response.flushBuffer();
        } catch (final IOException e) {
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.