Examples of startObjectOutput()


Examples of org.infinispan.marshall.StreamingMarshaller.startObjectOutput()

   public void testToStream() throws Exception {
      cs.store(TestInternalCacheEntryFactory.create("k1", "v1", -1, -1));

      StreamingMarshaller marshaller = getMarshaller();
      ByteArrayOutputStream out = new ByteArrayOutputStream();
      ObjectOutput oo = marshaller.startObjectOutput(out, false, 12);
      try {
         cs.toStream(new UnclosableObjectOutputStream(oo));
      } finally {
         marshaller.finishObjectOutput(oo);
         out.close();
View Full Code Here

Examples of org.infinispan.marshall.StreamingMarshaller.startObjectOutput()

      cs.store(TestInternalCacheEntryFactory.create(k1, v1));
      cs.store(TestInternalCacheEntryFactory.create(k2, v2));

      StreamingMarshaller marshaller = getMarshaller();
      ByteArrayOutputStream out = new ByteArrayOutputStream();
      ObjectOutput oo = marshaller.startObjectOutput(out, false, 12);
      try {
         cs.toStream(new UnclosableObjectOutputStream(oo));
      } finally {
         marshaller.finishObjectOutput(oo);
         out.close();
View Full Code Here

Examples of org.infinispan.marshall.StreamingMarshaller.startObjectOutput()

      cs.store(TestInternalCacheEntryFactory.create("k2", "v2"));
      cs.store(TestInternalCacheEntryFactory.create("k3", "v3"));

      StreamingMarshaller marshaller = getMarshaller();
      ByteArrayOutputStream out = new ByteArrayOutputStream();
      ObjectOutput oo = marshaller.startObjectOutput(out, false, 12);
      try {
         cs.toStream(new UnclosableObjectOutputStream(oo));
      } finally {
         marshaller.finishObjectOutput(oo);
         out.close();
View Full Code Here

Examples of org.infinispan.marshall.StreamingMarshaller.startObjectOutput()

      StreamingMarshaller marshaller = getMarshaller();
      ByteArrayOutputStream out = new ByteArrayOutputStream();
      byte[] dummyStartBytes = {1, 2, 3, 4, 5, 6, 7, 8};
      byte[] dummyEndBytes = {8, 7, 6, 5, 4, 3, 2, 1};
      ObjectOutput oo = marshaller.startObjectOutput(out, false ,12);
      try {
         oo.write(dummyStartBytes);
         cs.toStream(new UnclosableObjectOutputStream(oo));
         oo.flush();
         oo.write(dummyEndBytes);
View Full Code Here

Examples of org.infinispan.marshall.StreamingMarshaller.startObjectOutput()

   public void testToStream() throws Exception {
      cs.store(TestInternalCacheEntryFactory.create("k1", "v1", -1, -1));

      StreamingMarshaller marshaller = getMarshaller();
      ByteArrayOutputStream out = new ByteArrayOutputStream();
      ObjectOutput oo = marshaller.startObjectOutput(out, false, 12);
      try {
         cs.toStream(new UnclosableObjectOutputStream(oo));
      } finally {
         marshaller.finishObjectOutput(oo);
         out.close();
View Full Code Here

Examples of org.infinispan.marshall.StreamingMarshaller.startObjectOutput()

      cs.store(TestInternalCacheEntryFactory.create(k1, v1));
      cs.store(TestInternalCacheEntryFactory.create(k2, v2));

      StreamingMarshaller marshaller = getMarshaller();
      ByteArrayOutputStream out = new ByteArrayOutputStream();
      ObjectOutput oo = marshaller.startObjectOutput(out, false, 12);
      try {
         cs.toStream(new UnclosableObjectOutputStream(oo));
      } finally {
         marshaller.finishObjectOutput(oo);
         out.close();
View Full Code Here

Examples of org.infinispan.marshall.StreamingMarshaller.startObjectOutput()

      cacheStore.store(TestInternalCacheEntryFactory.create(MIRCEA, "value1"));
      cacheStore.store(TestInternalCacheEntryFactory.create(MANIK, "value2"));
      assertRowCounts(2, 2);
      StreamingMarshaller marshaller = getMarshaller();
      ByteArrayOutputStream out = new ByteArrayOutputStream();
      ObjectOutput oo = marshaller.startObjectOutput(out, false, 12);
      try {
         cacheStore.toStream(new UnclosableObjectOutputStream(oo));
      } finally {
         marshaller.finishObjectOutput(oo);
         out.close();
View Full Code Here

Examples of org.infinispan.marshall.StreamingMarshaller.startObjectOutput()

   public void testToStream() throws Exception {
      cs.store(TestInternalCacheEntryFactory.create("k1", "v1", -1, -1));

      StreamingMarshaller marshaller = getMarshaller();
      ByteArrayOutputStream out = new ByteArrayOutputStream();
      ObjectOutput oo = marshaller.startObjectOutput(out, false, 12);
      try {
         cs.toStream(new UnclosableObjectOutputStream(oo));
      } finally {
         marshaller.finishObjectOutput(oo);
         out.close();
View Full Code Here

Examples of org.infinispan.marshall.StreamingMarshaller.startObjectOutput()

      cs.store(TestInternalCacheEntryFactory.create(k1, v1));
      cs.store(TestInternalCacheEntryFactory.create(k2, v2));

      StreamingMarshaller marshaller = getMarshaller();
      ByteArrayOutputStream out = new ByteArrayOutputStream();
      ObjectOutput oo = marshaller.startObjectOutput(out, false, 12);
      try {
         cs.toStream(new UnclosableObjectOutputStream(oo));
      } finally {
         marshaller.finishObjectOutput(oo);
         out.close();
View Full Code Here

Examples of org.infinispan.marshall.StreamingMarshaller.startObjectOutput()

    cs.store(TestInternalCacheEntryFactory.create(obj2.getKey(), obj2.getValue()));
    cs.store(TestInternalCacheEntryFactory.create(obj3.getKey(), obj3.getValue()));

    StreamingMarshaller marshaller = getMarshaller();
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    ObjectOutput oo = marshaller.startObjectOutput(out, false, 12);
    try {
      cs.toStream(new UnclosableObjectOutputStream(oo));
    } finally {
      marshaller.finishObjectOutput(oo);
      out.close();
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.