Package org.jboss.serial.objectmetamodel

Examples of org.jboss.serial.objectmetamodel.DataContainer


            {

                if (useJRunit) ThreadLocalBenchmark.openBench(myTest.getClass().getName(),metaData);
                original = System.currentTimeMillis();
            }
            DataContainer container = new DataContainer(false,buffer);
            ObjectOutput out = container.getOutput();
            out.writeObject(myTest);
            container.flush();

            ObjectInput input = container.getInput();

            Object value = input.readObject();

            if (!(myTest instanceof String[]))
              {
View Full Code Here


    }
    public void testSubstitution() throws Exception
    {

        Level1 level1 = new Level1();
        DataContainer container = new DataContainer(this.getClass().getClassLoader(),new Substitution(),false,null);
        ObjectOutput output =container.getOutput();
        output.writeObject(level1);
        output.flush();

        Level1 newLevel1 = (Level1)container.getInput().readObject();

        assertEquals("modified",newLevel1.getValue());
        assertEquals("modified",newLevel1.getLevel2().getValue());
        assertEquals("modified",newLevel1.getLevel2().getLevel3().getValue());
    }
View Full Code Here

    DataContainer container;

    public LocalMarshalledValue (Object obj) throws IOException
    {
        container = new DataContainer(true,null);
        ObjectOutput output = container.getOutput();
        output.writeObject(obj);
    }
View Full Code Here

    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
        byte[] bytes = new byte[in.readInt()];
        in.readFully(bytes);
        ByteArrayInputStream byteInput = new ByteArrayInputStream(bytes);
        DataInputStream input = new DataInputStream(byteInput);
        container = new DataContainer(true,null);
        container.loadData(input);
    }
View Full Code Here

   {
   }

   public LocalMarshalledValue(Object obj) throws IOException
   {
      container = new DataContainer(false);
      ObjectOutput output = container.getOutput();
      output.writeObject(obj);
      output.flush();
      container.flush();
   }
View Full Code Here

      container.flush();
   }

   public LocalMarshalledValue(Object obj, SafeCloningRepository safeToReuse) throws IOException
   {
      container = new DataContainer(null, null, safeToReuse, false);
      ObjectOutput output = container.getOutput();
      output.writeObject(obj);
      output.flush();
      container.flush();
   }
View Full Code Here

      log.warn("LocalmarshalledValue readExternal is deprecated. This version is best used on call-by-value operations");
      byte[] bytes = new byte[in.readInt()];
      in.readFully(bytes);
      ByteArrayInputStream byteInput = new ByteArrayInputStream(bytes);
      DataInputStream input = new DataInputStream(byteInput);
      container = new DataContainer(false);
      container.loadData(input);
   }
View Full Code Here

   {
   }

   public LocalMarshalledValue(Object obj) throws IOException
   {
      container = new DataContainer(false);
      ObjectOutput output = container.getOutput();
      output.writeObject(obj);
      output.flush();
      container.flush();
   }
View Full Code Here

      container.flush();
   }

   public LocalMarshalledValue(Object obj, SafeCloningRepository safeToReuse) throws IOException
   {
      container = new DataContainer(null, null, safeToReuse, false);
      ObjectOutput output = container.getOutput();
      output.writeObject(obj);
      output.flush();
      container.flush();
   }
View Full Code Here

      log.warn("LocalmarshalledValue readExternal is deprecated. This version is best used on call-by-value operations");
      byte[] bytes = new byte[in.readInt()];
      in.readFully(bytes);
      ByteArrayInputStream byteInput = new ByteArrayInputStream(bytes);
      DataInputStream input = new DataInputStream(byteInput);
      container = new DataContainer(false);
      container.loadData(input);
   }
View Full Code Here

TOP

Related Classes of org.jboss.serial.objectmetamodel.DataContainer

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.