Package org.exist.xquery.value

Examples of org.exist.xquery.value.Base64BinaryDocument


                long binaryLength = context.getBroker().getBinaryResourceSize(bin);

                byte[] data = new byte[(binaryLength > (long)Integer.MAX_VALUE)?Integer.MAX_VALUE:(int)binaryLength];
                is.read(data);
                is.close(); */
                final Base64BinaryDocument b64doc = Base64BinaryDocument.getInstance(context, is);
                b64doc.setUrl(path);
                return b64doc;
            }
            else
            {
                return BooleanValue.TRUE;
View Full Code Here


                   
                    doc = context.getBroker().getResourceById(collectionId, resourceType, documentId);
                    if(doc instanceof BinaryDocument) {
                        final BinaryDocument bin = (BinaryDocument) doc;
                        final InputStream is = context.getBroker().getBinaryResource(bin);
                        final Base64BinaryDocument b64doc = Base64BinaryDocument.getInstance(context, is);
                        return b64doc;
                    } else {
                        return new NodeProxy(doc);
                    }                   
                }
View Full Code Here

            streamSource.setInputStream(is);

            //TODO consider using BinaryValue.getInputStream()

            if (item instanceof Base64BinaryDocument) {
                final Base64BinaryDocument b64doc = (Base64BinaryDocument) item;
                final String url = "xmldb:exist://" + b64doc.getUrl();
                LOG.debug("Base64BinaryDocument detected, adding URL " + url);
                streamSource.setSystemId(url);
            }

        } else {
View Full Code Here

TOP

Related Classes of org.exist.xquery.value.Base64BinaryDocument

Copyright © 2018 www.massapicom. 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.