Examples of writeObject()


Examples of com.sleepycat.bind.serial.SerialOutput.writeObject()

    int runSerialShared()
        throws Exception {

        fo.reset();
        SerialOutput oos = new SerialOutput(fo, jtc);
        oos.writeObject(new Data());
        byte[] bytes = fo.toByteArray();
        FastInputStream fi = new FastInputStream(bytes);
        SerialInput ois = new SerialInput(fi, jtc);
        ois.readObject();
        return (bytes.length - SerialOutput.getStreamHeader().length);
View Full Code Here

Examples of com.sun.enterprise.container.common.spi.util.JavaEEObjectOutputStream.writeObject()

      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      Collection<JavaEEObjectStreamHandler> handlers = new ArrayList<>();
      handlers.add(getHandler());
      JavaEEObjectOutputStream oos = new JavaEEObjectOutputStream(baos,
          true, handlers);
      oos.writeObject(object);
      return baos.toByteArray();
    } catch (Exception e) {
      LOG.warn(
          "Caught Exception attempting to serialize. Falling Back\n {} ",
          e);
View Full Code Here

Examples of com.sun.faces.util.DebugObjectOutputStream.writeObject()

            if (debugSerializedState) {
                ByteArrayOutputStream discard = new ByteArrayOutputStream();
                DebugObjectOutputStream out =
                        new DebugObjectOutputStream(discard);
                try {
                    out.writeObject(stateToWrite[0]);
                } catch (Exception e) {
                    throw new FacesException(
                            "Serialization error. Path to offending instance: "
                            + out.getStack(), e);
                }           
View Full Code Here

Examples of com.sun.grid.jgrid.server.JCEPOutputStream.writeObject()

   */
  private void writeJobToDisk () throws IOException {
    FileOutputStream fout = new FileOutputStream (filename);
    JCEPOutputStream oout = new JCEPOutputStream (fout, annotation);
   
    oout.writeObject (this);
   
    oout.close ();
  }
}
View Full Code Here

Examples of com.sun.j3d.utils.scenegraph.io.state.com.sun.j3d.utils.universe.SimpleUniverseState.writeObject()

/* 427 */     if (universe == null) {
/* 428 */       out.writeUTF("null");
/* 429 */     } else if ((universe instanceof SimpleUniverse)) {
/* 430 */       out.writeUTF(universe.getClass().getName());
/* 431 */       SimpleUniverseState state = new SimpleUniverseState(universe, this);
/* 432 */       state.writeObject(out);
/*     */
/* 434 */       if (writeUniverseContent) {
/* 435 */         state.detachAllGraphs();
/* 436 */         int[] graphs = state.getAllGraphIDs();
/* 437 */         for (int i = 0; i < graphs.length; i++) {
View Full Code Here

Examples of com.sun.jini.test.spec.io.util.FakeMarshalOutputStream.writeObject()

            ArrayList context = new ArrayList();
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            MarshalOutputStream output = new FakeMarshalOutputStream(
                baos,context,"http://foo.bar");
            output.writeObject(new File("test case " + (i+1)));
            output.close();

            // Attempt to read from MarshalInputStream

            ByteArrayInputStream bios = new ByteArrayInputStream(
View Full Code Here

Examples of com.sun.star.io.XObjectOutputStream.writeObject()

       
        // write the object
        try {
            XObjectOutputStream oStream = (XObjectOutputStream)
                                    tEnv.getObjRelation("StreamWriter");
            oStream.writeObject((XPersistObject)objWrite);
        } catch(com.sun.star.io.IOException e) {
            log.println("Couldn't write object to stream");
            e.printStackTrace(log);
            tRes.tested("readObject()", Status.skipped(false));
            return;
View Full Code Here

Examples of com.sun.star.lib.uno.environments.remote.IMarshal.writeObject()

    };


    for(int i = 0; i < dataTypes.length; ++ i) {
      Object op1 = data[i];
      iMarshal.writeObject(dataTypes[i], data[i]);

      IUnmarshal iUnmarshal = iProtocol.createUnmarshal(iMarshal.reset());

      Object op2 = iUnmarshal.readObject(dataTypes[i]);
View Full Code Here

Examples of com.tangosol.io.pof.PofBufferWriter.writeObject()

  }
 
  public void serialize(BufferOutput out, Object o) throws IOException {
    PofBufferWriter writer = new PofBufferWriter(out, this);
    try {
      writer.writeObject(-1, o);
    } catch (RuntimeException e) {
      IOException ioex = new IOException(e.getMessage());

      ioex.initCause(e);
      throw ioex;
View Full Code Here

Examples of com.thinkaurelius.titan.graphdb.database.serialize.DataOutput.writeObject()

        int i = 5;
        TestClass c = new TestClass(5, 8, new short[]{1, 2, 3, 4, 5}, TestEnum.Two);
        Number n = new Double(3.555);
        out.writeObjectNotNull(str);
        out.putInt(i);
        out.writeObject(c, TestClass.class);
        out.writeClassAndObject(n);
        ReadBuffer b = out.getStaticBuffer().asReadBuffer();
        if (printStats) log.debug(bufferStats(b));
        String str2 = serialize.readObjectNotNull(b, String.class);
        assertEquals(str, str2);
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.