Package org.xmlBlaster.client.protocol.http.common

Examples of org.xmlBlaster.client.protocol.http.common.ObjectInputStreamMicro.readObject()


         inVec.add(content);
         oosm.writeObject(inVec);
        
         ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
         ObjectInputStreamMicro oism = new ObjectInputStreamMicro(bais);
         Object obj = oism.readObject();
         assertTrue("hashtable is not of type 'Vector', it is " + obj.getClass().getName(), obj instanceof Vector);
         Vector vec = (Vector)obj;
         assertEquals("wrong number of entries in vector", 6, vec.size());
         Hashtable keyOut = (Hashtable)vec.get(0);
         Hashtable qosOut = (Hashtable)vec.get(1);
View Full Code Here


         hashtable.put("four", "4");
        
         oosm.writeObject(hashtable);
         ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
         ObjectInputStreamMicro oism = new ObjectInputStreamMicro(bais);
         Object obj = oism.readObject();
         assertTrue("hashtable is not of type 'Hashtable', it is " + obj.getClass().getName(), obj instanceof Hashtable);
         Hashtable table = (Hashtable)obj;
         assertEquals("wrong number of entries in hashtable", hashtable.size(), table.size());
         assertHashtableContent("one", hashtable, table);
         assertHashtableContent("two", hashtable, table);
View Full Code Here

        
         String testString = "this is\n\na simple\nmultiline string\n";
         oosm.writeObject(testString);
         ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
         ObjectInputStreamMicro oism = new ObjectInputStreamMicro(bais);
         Object obj = oism.readObject();
         assertTrue("string is not of type 'String', it is " + obj.getClass().getName(), obj instanceof String);
         String response = (String)obj;
         assertEquals("wrong content for the string", testString, response);
         log.info("testStringIO successfully completed");
      }
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.