Package com.sleepycat.bind.tuple

Examples of com.sleepycat.bind.tuple.TupleInput.readString()


        output.writeString("abc");
        val1.objectToEntry(val2, output);
        output.writeString("xyz");

        TupleInput input = new TupleInput(output);
        assertEquals("abc", input.readString());
        Object val3 = val1.entryToObject(input);
        assertEquals("xyz", input.readString());

        assertEquals(0, input.available());
        assertSame(val2.getClass(), val3.getClass());
View Full Code Here


        output.writeString("xyz");

        TupleInput input = new TupleInput(output);
        assertEquals("abc", input.readString());
        Object val3 = val1.entryToObject(input);
        assertEquals("xyz", input.readString());

        assertEquals(0, input.available());
        assertSame(val2.getClass(), val3.getClass());
        assertEquals(val2, val3);
    }
View Full Code Here

        assertEquals(4, buffer.getSize());

        Object result = binding.entryToObject(buffer);
        assertTrue(result instanceof TupleInput);
        TupleInput in = (TupleInput) result;
        assertEquals("abc", in.readString());
        assertEquals(0, in.available());
    }

    // also tests TupleBinding since TupleMarshalledBinding extends it
    public void testTupleMarshalledBinding() {
View Full Code Here

            while (objectsCursor.getNext(key, value, LockMode.RMW) == OperationStatus.SUCCESS)
            {
                UUID id = UUIDTupleBinding.getInstance().entryToObject(key);
                TupleInput input = TupleBinding.entryToInput(value);
                String type = input.readString();
                String json = input.readString();
                Map<String,Object> attributes = null;
                try
                {
                    attributes = mapper.readValue(json, MAP_TYPE_REFERENCE);
View Full Code Here

            while (objectsCursor.getNext(key, value, LockMode.RMW) == OperationStatus.SUCCESS)
            {
                UUID id = UUIDTupleBinding.getInstance().entryToObject(key);
                TupleInput input = TupleBinding.entryToInput(value);
                String type = input.readString();
                String json = input.readString();
                Map<String,Object> attributes = null;
                try
                {
                    attributes = mapper.readValue(json, MAP_TYPE_REFERENCE);
                }
View Full Code Here

   private Fqn makeKeyObject(DatabaseEntry entry) {

      Fqn name = Fqn.ROOT;
      TupleInput tupleInput = TupleBinding.entryToInput(entry);
      while (tupleInput.available() > 0) {
         String part = tupleInput.readString();
         name=new Fqn(name, part);
      }
      return name;
   }
View Full Code Here

      Fqn name = Fqn.ROOT;
      TupleInput tupleInput = TupleBinding.entryToInput(entry);
      while (tupleInput.available() > 0)
      {
         String part = tupleInput.readString();
         name = Fqn.fromRelativeElements(name, part);
      }
      return name;
   }
View Full Code Here

      Fqn name = Fqn.ROOT;
      TupleInput tupleInput = TupleBinding.entryToInput(entry);
      while (tupleInput.available() > 0)
      {
         String part = tupleInput.readString();
         name = Fqn.fromRelativeElements(name, part);
      }
      return name;
   }
View Full Code Here

      Fqn name = Fqn.ROOT;
      TupleInput tupleInput = TupleBinding.entryToInput(entry);
      while (tupleInput.available() > 0)
      {
         String part = tupleInput.readString();
         name = new Fqn(name, part);
      }
      return name;
   }
View Full Code Here

      Fqn name = Fqn.ROOT;
      TupleInput tupleInput = TupleBinding.entryToInput(entry);
      while (tupleInput.available() > 0)
      {
         String part = tupleInput.readString();
         name = Fqn.fromRelativeElements(name, part);
      }
      return name;
   }
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.