Examples of TupleOutput


Examples of com.sleepycat.bind.tuple.TupleOutput

    }

    // javadoc is inherited
    public void objectToKey(Object object, DatabaseEntry key) {

        TupleOutput output = getTupleOutput(object);
        objectToKey(object, output);
        outputToEntry(output, key);
    }
View Full Code Here

Examples of com.sleepycat.bind.tuple.TupleOutput

    }

    public void setUp() {

        DbTestUtil.printTestName("TupleOrderingTest." + getName());
        out = new TupleOutput();
        prevBuf = null;
    }
View Full Code Here

Examples of com.sleepycat.bind.tuple.TupleOutput

    public void setUp() {

        DbTestUtil.printTestName("TupleFormatTest." + getName());
        buffer = new DatabaseEntry();
        out = new TupleOutput();
    }
View Full Code Here

Examples of com.sleepycat.bind.tuple.TupleOutput

                AMQShortString queueNameAMQ = new AMQShortString(queueName);
                QueueRecord record = new QueueRecord(queueNameAMQ, null, false, null);

                DatabaseEntry key = new DatabaseEntry();

                TupleOutput output = new TupleOutput();
                AMQShortStringEncoding.writeShortString(record.getNameShortString(), output);
                TupleBase.outputToEntry(output, key);

                DatabaseEntry newValue = new DatabaseEntry();
                binding.objectToEntry(record, newValue);
View Full Code Here

Examples of com.sleepycat.bind.tuple.TupleOutput

{

    public void testWriteReadNullValues()
    {
        // write into tuple output
        TupleOutput tupleOutput = new TupleOutput();
        AMQShortStringEncoding.writeShortString(null, tupleOutput);
        byte[] data = tupleOutput.getBufferBytes();

        // read from tuple input
        TupleInput tupleInput = new TupleInput(data);
        AMQShortString result = AMQShortStringEncoding.readShortString(tupleInput);
        assertNull("Expected null but got " + result, result);
View Full Code Here

Examples of com.sleepycat.bind.tuple.TupleOutput

    public void testWriteReadShortStringWithLengthOver127()
    {
        AMQShortString value = createString('a', 128);

        // write into tuple output
        TupleOutput tupleOutput = new TupleOutput();
        AMQShortStringEncoding.writeShortString(value, tupleOutput);
        byte[] data = tupleOutput.getBufferBytes();

        // read from tuple input
        TupleInput tupleInput = new TupleInput(data);
        AMQShortString result = AMQShortStringEncoding.readShortString(tupleInput);
        assertEquals("Expected " + value + " but got " + result, value, result);
View Full Code Here

Examples of com.sleepycat.bind.tuple.TupleOutput

    public void testWriteReadShortStringWithLengthLess127()
    {
        AMQShortString value = new AMQShortString("test");

        // write into tuple output
        TupleOutput tupleOutput = new TupleOutput();
        AMQShortStringEncoding.writeShortString(value, tupleOutput);
        byte[] data = tupleOutput.getBufferBytes();

        // read from tuple input
        TupleInput tupleInput = new TupleInput(data);
        AMQShortString result = AMQShortStringEncoding.readShortString(tupleInput);
        assertEquals("Expected " + value + " but got " + result, value, result);
View Full Code Here

Examples of com.sleepycat.bind.tuple.TupleOutput

        _object = new ConfiguredObjectRecord(UUIDGenerator.generateRandomUUID(), DUMMY_TYPE_STRING, DUMMY_ATTRIBUTES_STRING);
    }

    public void testObjectToEntryAndEntryToObject()
    {
        TupleOutput tupleOutput = new TupleOutput();

        _configuredObjectBinding.objectToEntry(_object, tupleOutput);

        byte[] entryAsBytes = tupleOutput.getBufferBytes();
        TupleInput tupleInput = new TupleInput(entryAsBytes);

        ConfiguredObjectRecord storedObject = _configuredObjectBinding.entryToObject(tupleInput);
        assertEquals("Unexpected attributes", DUMMY_ATTRIBUTES_STRING, storedObject.getAttributes());
        assertEquals("Unexpected type", DUMMY_TYPE_STRING, storedObject.getType());
View Full Code Here

Examples of com.sleepycat.bind.tuple.TupleOutput

                AMQShortString queueNameAMQ = new AMQShortString(queueName);
                QueueRecord record = new QueueRecord(queueNameAMQ, null, false, null);

                DatabaseEntry key = new DatabaseEntry();

                TupleOutput output = new TupleOutput();
                AMQShortStringEncoding.writeShortString(record.getNameShortString(), output);
                TupleBase.outputToEntry(output, key);

                DatabaseEntry newValue = new DatabaseEntry();
                binding.objectToEntry(record, newValue);
View Full Code Here

Examples of com.sleepycat.bind.tuple.TupleOutput

        CaptureSizeBinding() {
            super();
        }

        public TupleOutput getTupleOutput(Object object) {
            TupleOutput out = super.getTupleOutput(object);
            bufSize = out.getBufferBytes().length;
            return out;
        }
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.