Package org.jboss.serial.io

Examples of org.jboss.serial.io.JBossObjectInputStreamSharedTree.readObject()


    objOut.reset();
    objOut.writeObject(circular.getReferences());
   
    ObjectInputStream objInput = new JBossObjectInputStreamSharedTree(new ByteArrayInputStream(byteOut.toByteArray()));
   
    Object first = objInput.readObject();
    TestCircularReferences second = (TestCircularReferences)objInput.readObject();
    Object third = objInput.readObject();
    assertSame((Object)second.getReferences(),first);
    assertEquals(circular.getReferences().size(),((Collection)third).size());
    assertNotSame(third,second);
View Full Code Here


    objOut.writeObject(circular.getReferences());
   
    ObjectInputStream objInput = new JBossObjectInputStreamSharedTree(new ByteArrayInputStream(byteOut.toByteArray()));
   
    Object first = objInput.readObject();
    TestCircularReferences second = (TestCircularReferences)objInput.readObject();
    Object third = objInput.readObject();
    assertSame((Object)second.getReferences(),first);
    assertEquals(circular.getReferences().size(),((Collection)third).size());
    assertNotSame(third,second);
  }
View Full Code Here

   
    ObjectInputStream objInput = new JBossObjectInputStreamSharedTree(new ByteArrayInputStream(byteOut.toByteArray()));
   
    Object first = objInput.readObject();
    TestCircularReferences second = (TestCircularReferences)objInput.readObject();
    Object third = objInput.readObject();
    assertSame((Object)second.getReferences(),first);
    assertEquals(circular.getReferences().size(),((Collection)third).size());
    assertNotSame(third,second);
  }
}
View Full Code Here

              calledResolve++;
              return super.resolveClass(desc);
            }
               
              };
            domain2= is.readObject();
          }
          assertTrue("ReadResolve wasn't called for shared tree",calledResolve>0);

          calledResolve=0;
          for (int i=0;i<20;i++)
View Full Code Here

              calledResolve++;
              return super.resolveClass(desc);
            }
               
              };
            domain2= is.readObject();
          }
          assertTrue("ReadResolve wasn't supposed to be called here",calledResolve==0);
   
    }
    catch (Throwable e)
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.