Package de.fhg.igd.mongomvcc

Examples of de.fhg.igd.mongomvcc.VCollection.findOne()


    obj = new HashMap<String, Object>();
    obj.put("name", "Mona Lisa");
    obj.put("data", bais);
    coll.insert(obj);
   
    Map<String, Object> obj3 = coll.findOne(_factory.createDocument("uid", obj.get("uid")));
    assertEquals("Mona Lisa", obj3.get("name"));
    InputStream is3 = (InputStream)obj3.get("data");
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    byte[] buf = new byte[64 * 1024];
    int read;
View Full Code Here


    ByteBuffer bb = ByteBuffer.wrap(test);
    obj = new HashMap<String, Object>();
    obj.put("name", "Mona Lisa");
    obj.put("data", bb);
    coll.insert(obj);
    Map<String, Object> obj4 = coll.findOne(_factory.createDocument("uid", obj.get("uid")));
    assertEquals("Mona Lisa", obj4.get("name"));
    ByteBuffer bb4 = (ByteBuffer)obj4.get("data");
    bb4.rewind();
    byte[] test4 = new byte[bb4.remaining()];
    bb4.get(test4);
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.