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

Examples of org.xmlBlaster.client.protocol.http.common.ObjectOutputStreamMicro.writeObject()


         hashtable.put("one", "1");
         hashtable.put("two", "2");
         hashtable.put("three", "3");
         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;
View Full Code Here


      try {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStreamMicro oosm = new ObjectOutputStreamMicro(baos);
        
         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;
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.