Package org.exoplatform.services.jcr.impl.core.value

Examples of org.exoplatform.services.jcr.impl.core.value.BinaryValue.update()


      BinaryValue exv = (BinaryValue)p.getValue();
      long pos = exv.getLength() + 1024 * 1024 * 5;

      long fmem = Runtime.getRuntime().freeMemory();

      exv.update(new FileInputStream(testFile), testFile.length(), pos);

      long fmemAfter = Runtime.getRuntime().freeMemory();

      if ((fmemAfter - fmem) >= (pos + testFile.length()))
         log.warn("Free memory must not be increased on value of the new Value size but does. Was " + fmem
View Full Code Here


      assertEquals("Value data length must be increased ", pos + testFile.length(), newexv.getLength());

      // update inside the big data
      int npos = 5;
      newexv.update(new FileInputStream(testFile), testFile.length(), npos);

      // apply to the Property and save
      p.setValue(newexv);
      testRoot.save();
View Full Code Here

      String update1String = "update#1";

      long pos = 1024 * 1024;

      exv.update(new ByteArrayInputStream(update1String.getBytes()), update1String.length(), pos);

      p.setValue(exv);
      testRoot.save();

      // read partial
View Full Code Here

      String update1String = "update#1";

      long pos = testFile.length();

      exv.update(new ByteArrayInputStream(update1String.getBytes()), update1String.length(), pos);

      p.setValue(exv);
      testRoot.save();

      // read partial greater the value size
View Full Code Here

      String update1String = "update#1";

      long pos = 6;

      exv.update(new ByteArrayInputStream(update1String.getBytes()), update1String.length(), pos);

      p.setValue(exv);
      testRoot.save();

      // read partial
View Full Code Here

      String update1String = "update#1";

      long pos = exv.getLength() + 1;

      exv.update(new ByteArrayInputStream(update1String.getBytes()), update1String.length(), pos);

      p.setValue(exv);
      testRoot.save();

      // read partial greater the value size
View Full Code Here

      Random random = new Random();

      random.nextBytes(data);

      // update
      exv.update(new ByteArrayInputStream(data), size, pos);

      // transient, before the save
      try
      {
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.