Examples of writeObject()


Examples of org.apache.geronimo.util.asn1.ASN1OutputStream.writeObject()

            while (e.hasMoreElements())
            {
                DEREncodable    oid = (DEREncodable)e.nextElement();

                aOut.writeObject(oid);
                aOut.writeObject(pkcs12Attributes.get(oid));
            }

            out.writeObject(bOut.toByteArray());
        }
View Full Code Here

Examples of org.apache.geronimo.util.asn1.DEROutputStream.writeObject()

        try
        {
            ByteArrayOutputStream   bOut = new ByteArrayOutputStream();
            DEROutputStream         dOut = new DEROutputStream(bOut);

            dOut.writeObject(reqInfo);

            sig.update(bOut.toByteArray());
        }
        catch (Exception e)
        {
View Full Code Here

Examples of org.apache.harmony.rmi.MarshalledObjectOutputStream.writeObject()

    private final int hash;

    public MarshalledObject(T obj) throws IOException {
        ByteArrayOutputStream objStream = new ByteArrayOutputStream();
        MarshalledObjectOutputStream moStream = new MarshalledObjectOutputStream(objStream);
        moStream.writeObject(obj);
        moStream.flush();
        objBytes = objStream.toByteArray();
        locBytes = moStream.getLocBytes();

        // calculate hash code
View Full Code Here

Examples of org.apache.harmony.rmi.transport.RMIObjectOutputStream.writeObject()

                skel.dispatch((Remote) ref.get(), call, op, h);
            } catch (Throwable t) {
                Exception ex = prepareException(m, t);
                RMIObjectOutputStream oout =
                        (RMIObjectOutputStream) call.getResultStream(false);
                oout.writeObject(ex);
            }

            try {
                call.getOutputStream().flush();
            } catch (IOException ioe) {
View Full Code Here

Examples of org.apache.niolex.commons.stream.KryoOutstream.writeObject()

     */
    @Override
    protected void run() {
      ByteArrayOutputStream bos = new ByteArrayOutputStream();
      KryoOutstream ooo = new KryoOutstream(bos);
      ooo.writeObject(bench);
      ooo.writeObject(q);
      ooo.close();
      byte[] bs = bos.toByteArray();
      KryoInstream iii = new KryoInstream(new ByteArrayInputStream(bs));
      Benchmark cp = iii.readObject(Benchmark.class);
View Full Code Here

Examples of org.apache.pivot.json.JSONSerializer.writeObject()

        File file;
        try {
            file = File.createTempFile(getClass().getName(), null, directory);

            JSONSerializer jsonSerializer = new JSONSerializer();
            jsonSerializer.writeObject(value, new FileOutputStream(file));
        } catch (IOException exception) {
            throw new QueryException(Query.Status.INTERNAL_SERVER_ERROR);
        } catch (SerializationException exception) {
            throw new QueryException(Query.Status.INTERNAL_SERVER_ERROR);
        }
View Full Code Here

Examples of org.apache.pivot.serialization.BinarySerializer.writeObject()

        Object[] inputData;

        try {
            ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
            try {
                serializer.writeObject(outputData, outputStream);
            } finally {
                outputStream.close();
            }

            ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
View Full Code Here

Examples of org.apache.pivot.serialization.ByteArraySerializer.writeObject()

        log("writeValues()");

        Serializer<byte[]> serializer = new ByteArraySerializer();

        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        serializer.writeObject(testBytes, outputStream);

        outputStream.flush();
        outputStream.close();

        byte[] result = outputStream.toByteArray();
View Full Code Here

Examples of org.apache.pivot.serialization.CSVSerializer.writeObject()

        StringWriter writer = new StringWriter();

        CSVSerializer serializer = new CSVSerializer();
        serializer.setKeys("A", "B", "C");

        serializer.writeObject(items, writer);

        assertEquals("a1,b1,c1\r\na2,b2,c2\r\n", writer.toString());
    }

    @Test
View Full Code Here

Examples of org.apache.pivot.serialization.JSONSerializer.writeObject()

        ServletInputStream inputStream = request.getInputStream();
        JSONSerializer jsonSerializer = new JSONSerializer();

        try {
            Object value = jsonSerializer.readObject(inputStream);
            jsonSerializer.writeObject(value, System.out);
            response.setStatus(201);
            response.setHeader("Location", request.getPathInfo() +"#101");
        } catch(SerializationException exception) {
            throw new ServletException(exception);
        }
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.