Examples of writeObject()


Examples of com.threerings.io.ObjectOutputStream.writeObject()

            this(tourneyConfig.tourneyId);
            ByteArrayOutputStream bstream = new ByteArrayOutputStream();
            ObjectOutputStream ostream = new ObjectOutputStream(bstream);

            try {
                ostream.writeObject(config);
                config = bstream.toByteArray();

            } catch (IOException e) {
                log.warning("Error writing TourneyConfig to byte array [e=" + e + "].");
            }
View Full Code Here

Examples of com.twitter.chill.SerDeState.writeObject()

    public void serialize(Object o) throws IOException {
        // The outputs are borrowed in a clean state, ready to use
        SerDeState st = kryoPool.borrow();
        try {
          st.writeObject(o);
          // Copy from buffer to output stream.
          outputStream.writeInt(st.numOfWrittenBytes());
          st.writeOutputTo(outputStream);
        }
        finally {
View Full Code Here

Examples of com.wutka.jox.MyJOXBeanOutputStream.writeObject()

            //ByteArrayOutputStream xmlData = new ByteArrayOutputStream();
            joxOut = new MyJOXBeanOutputStream(fileOut);
        }
       
        try {
            joxOut.writeObject(beanName(bean), bean, doctypeDeclaration);
            //IndentingParser.writeIdented(outputXmlFileName);
        } catch (IOException exc) {
            exc.printStackTrace();
            return false; //null;
        } finally {
View Full Code Here

Examples of datasoul.serviceitems.song.Song.writeObject()

            processFile.delete();
        }

        // Write the file
        try{
            Node node = song.writeObject(null);
            Document doc = node.getOwnerDocument();
            doc.appendChild( node);                        // Add Root to Document
            FileOutputStream fos = new FileOutputStream(song.getFilePath());

            Source source = new DOMSource(doc);
View Full Code Here

Examples of de.ruedigermoeller.serialization.FSTObjectOutput.writeObject()

        try {
            @Cleanup
            ByteArrayOutputStream os = new ByteArrayOutputStream();
            FSTObjectOutput oos = conf.getObjectOutput(os);
            oos.writeObject(graph);
            oos.flush();

            return os.toByteArray();
        } catch (Exception e) {
            log.warn("Fail to serializer graph. graph=" + graph, e);
View Full Code Here

Examples of flex.messaging.io.amf.Amf3Output.writeObject()

    // Create the AMF3Output object and set its output stream.
    final Amf3Output amf3Output = new Amf3Output(context);
    amf3Output.setOutputStream(bout);
    // Write the AMF3 object to the byte array output stream after
    // converting the source java object.
    amf3Output.writeObject(source);
    // Flush and close the stream.
    amf3Output.flush();
    amf3Output.close();
    return bout;
  }
View Full Code Here

Examples of flex.messaging.io.amfx.AmfxOutput.writeObject()

        ByteArrayOutputStream outStream = new ByteArrayOutputStream();
        DataOutputStream dataOutStream = new DataOutputStream(outStream);
        amfxOut.setOutputStream(dataOutStream);
        try
        {
            amfxOut.writeObject(message);   
        }
        catch (IOException e)
        {
            if (Log.isDebug())
                log.debug("MPI exception while retrieving the size of the serialized message: " + e.toString());             
View Full Code Here

Examples of gnu.java.rmi.RMIMarshalledObjectOutputStream.writeObject()

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

    // The following algorithm of calculating hashCode is similar to String
View Full Code Here

Examples of java.beans.PersistenceDelegate.writeObject()

     */
    public void testArrayPD_Normal() {
        Encoder enc = new MockEncoder();
        int[] ia = new int[] { 1 };
        PersistenceDelegate pd = enc.getPersistenceDelegate(ia.getClass());
        pd.writeObject(ia, enc);
    }

    /*
     * BeanInfo for the MockBean below.
     */
 
View Full Code Here

Examples of java.beans.XMLEncoder.writeObject()

    UserManagerConfig config = new UserManagerConfig();
    List users = new ArrayList( usersMap.values() );
    config.setUsers(users);
   
    XMLEncoder encoder = new XMLEncoder( new BufferedOutputStream( out ) );
    encoder.writeObject(config);
    encoder.close();
  }

  public static UserManager getInstance(PluginInterface pi)
  {   
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.