Package com.volantis.mcs.accessors.xml.jibx

Examples of com.volantis.mcs.accessors.xml.jibx.JiBXWriter


                        createLayoutContentBuilder();
                final CanvasLayout layout = new CanvasLayout();
                layoutBuilder.setLayout(layout);
                contentBuilder = layoutBuilder;
            }
            final JiBXWriter writer = new JiBXWriter();
            final ByteArrayOutputStream baos = new ByteArrayOutputStream();
            writer.write(new OutputStreamWriter(baos), contentBuilder);
            layoutIFile = new LayoutIFile(baos.toByteArray(), file);
            variantBuilderProxyToIFile.put(variantBuilderProxy, layoutIFile);
        }
        return layoutIFile;
    }
View Full Code Here


    // Javadoc inherited
    public IResource createPolicy(IPath location, PolicyBuilder policy,
                                  CreatePolicyConfiguration config)
            throws PolicyFileAccessException {
        try {
            JiBXWriter writer = new JiBXWriter(false);
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            OutputStreamWriter osw = new OutputStreamWriter(baos);
            writer.write(osw, policy);
            InputStream is = new ByteArrayInputStream(baos.toByteArray());
            return createNewPolicy(is, location, config.getProgressMonitor(),
                    policy.getName());
        } catch (RepositoryException re) {
            throw new PolicyFileAccessException(re);
View Full Code Here

        }

        try {
            IFile file = (IFile) policyResource;
            StringWriter saved = new StringWriter();
            JiBXWriter writer = new JiBXWriter();
            writer.write(saved, policy);
            InputStream input = new ByteArrayInputStream(saved.toString().getBytes("UTF-8"));
            if (file.exists()) {
                file.setContents(input, IResource.KEEP_HISTORY, monitor);
            } else {
                file.create(input, IResource.KEEP_HISTORY, monitor);
View Full Code Here

                    // write data to a byte array and then ask super to convert to pMedium
                    ByteArrayOutputStream out = new ByteArrayOutputStream();
                    ObjectOutputStream oos = new ObjectOutputStream(out);
                    // Write out the count for the number of objects to write
                    oos.writeObject(new Integer(objects.length));
                    JiBXWriter writer = new JiBXWriter();

                    for (int i = 0; i < objects.length; i++) {
                        byte[] objectBuffer = objectToByteArray(writer, objects[i]);
                        oos.writeObject(objectBuffer);
                    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.accessors.xml.jibx.JiBXWriter

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.