Examples of writeExternal()


Examples of org.apache.directory.shared.ldap.model.name.Ava.writeExternal()

        Ava atav = new Ava( schemaManager, "userPKCS12", normValue );

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream out = new ObjectOutputStream( baos );

        atav.writeExternal( out );

        ObjectInputStream in = null;

        byte[] data = baos.toByteArray();
        in = new ObjectInputStream( new ByteArrayInputStream( data ) );
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.name.Dn.writeExternal()

        Dn dn1 = new Dn( schemaManager, "gn=john + cn=doe, dc=example, dc=com" );
       
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream out = new ObjectOutputStream( baos );

        dn1.writeExternal( out );
       
        ObjectInputStream in = null;

        byte[] data = baos.toByteArray();
        in = new ObjectInputStream( new ByteArrayInputStream( data ) );
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.name.Rdn.writeExternal()

        }
        else
        {
            out.writeByte( 1 );
            Rdn rdn = dn.getRdn();
            rdn.writeExternal( out );
        }

        // Then the attributes.
        out.writeInt( entry.getAttributeTypes().size() );
View Full Code Here

Examples of org.apache.geronimo.gbean.GBeanData.writeExternal()

            FileOutputStream fos = new FileOutputStream(stateFile);
            ObjectOutputStream oos;
            try {
                oos = new ObjectOutputStream(fos);
                GBeanData configurationGBeanData = ExecutableConfigurationUtil.getConfigurationGBeanData(configurationData);
                configurationGBeanData.writeExternal(oos);
                oos.flush();
            } finally {
                fos.close();
            }
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.geronimo.gbean.GBeanData.writeExternal()

        // save the persisted form in the source directory
        out.putNextEntry(new ZipEntry("META-INF/config.ser"));
        ObjectOutputStream objectOutputStream = null;
        try {
            objectOutputStream = new ObjectOutputStream(out);
            configurationGBeanData.writeExternal(objectOutputStream);
        } catch (IOException e) {
            throw e;
        } catch (Exception e) {
            throw new InvalidConfigException("Unable to save configuration state", e);
        } finally {
View Full Code Here

Examples of org.apache.geronimo.gbean.GBeanData.writeExternal()

        File configSer = new File(metaInf, "config.ser");
        ObjectOutputStream out = null;
        try {
            out = new ObjectOutputStream(new FileOutputStream(configSer));
            try {
                configurationGBeanData.writeExternal(out);
            } catch (IOException e) {
                throw e;
            } catch (Exception e) {
                throw new InvalidConfigException("Unable to save configuration state", e);
            }
View Full Code Here

Examples of org.apache.geronimo.gbean.GBeanData.writeExternal()

            sourceFile = File.createTempFile("test", ".car");
            source = sourceFile.toURL();
            JarOutputStream jos = new JarOutputStream(new BufferedOutputStream(new FileOutputStream(sourceFile)));
            jos.putNextEntry(new ZipEntry("META-INF/config.ser"));
            ObjectOutputStream oos = new ObjectOutputStream(jos);
            gbean.writeExternal(oos);
            oos.flush();
            jos.closeEntry();
            jos.close();
        } catch (Exception e) {
            if (sourceFile != null) {
View Full Code Here

Examples of org.apache.geronimo.gbean.GBeanData.writeExternal()

            throw (AssertionError) new AssertionError("Unable to initialize ObjectOutputStream").initCause(e);
        }
        for (Iterator iterator = gbeans.iterator(); iterator.hasNext();) {
            GBeanData gbeanData = (GBeanData) iterator.next();
            try {
                gbeanData.writeExternal(oos);
            } catch (Exception e) {
                throw (IOException) new IOException("Unable to serialize GBeanData for " + gbeanData.getAbstractName()).initCause(e);
            }
        }
        try {
View Full Code Here

Examples of org.apache.openejb.client.AuthenticationResponse.writeExternal()

            final AuthenticationResponse res = (AuthenticationResponse) response;
            res.setMetaData(metaData);

            try {
                res.writeExternal(out);
            } catch (Exception e) {
                logger.fatal("Could not write AuthenticationResponse to output stream", e);
            }
        } else {
            logger.error("AuthRequestHandler cannot process an instance of: " + response.getClass().getName());
View Full Code Here

Examples of org.apache.openejb.client.ClusterResponse.writeExternal()

                    try {
                        info.setOutputStream(new CountingOutputStream(rawOut));
                        oos = new ObjectOutputStream(info.getOutputStream());
                        clusterResponse.setMetaData(clientProtocol);
                        clusterResponse.writeExternal(oos);
                        oos.flush();
                    } catch (IOException ie) {
                        final String m = "Failed to write to ClusterResponse: " + ie.getMessage();
                        clusterHandler.getLogger().error(m, ie);
                        throw Exceptions.newIOException(m, ie);
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.