Package com.sleepycat.bdb.bind.tuple

Examples of com.sleepycat.bdb.bind.tuple.TupleOutput


    void initTuple()
        throws Exception {

        buf = new byte[500];
        to = new TupleOutput(buf);
    }
View Full Code Here


    // javadoc is inherited
    public void objectToData(Object object, DataBuffer data)
        throws IOException {

        TupleOutput output = format.newOutput();
        objectToData(object, output);
        format.outputToData(output, data);
    }
View Full Code Here

    // javadoc is inherited
    public void objectToKey(Object object, DataBuffer key)
        throws IOException {

        TupleOutput output = keyFormat.newOutput();
        objectToKey(object, output);
        keyFormat.outputToData(output, key);
    }
View Full Code Here

    public void extractIndexKey(DataBuffer primaryKeyData,
                                DataBuffer valueData,
                                DataBuffer indexKeyData)
        throws IOException {

        TupleOutput output = indexKeyFormat.newOutput();
        TupleInput primaryKeyInput = ((primaryKeyFormat != null)
                            ? primaryKeyFormat.dataToInput(primaryKeyData)
                            : null);
        Object valueInput = ((valueFormat != null)
                            ? valueFormat.dataToObject(valueData)
View Full Code Here

    // javadoc is inherited
    public void objectToKey(Object object, DataBuffer key)
        throws IOException {

        TupleOutput output = keyFormat.newOutput();
        objectToKey(object, output);
        keyFormat.outputToData(output, key);
    }
View Full Code Here

    // javadoc is inherited
    public void objectToValue(Object object, DataBuffer value)
        throws IOException {

        TupleOutput output = valueFormat.newOutput();
        objectToValue(object, output);
        valueFormat.outputToData(output, value);
    }
View Full Code Here

        throws IOException {

        DataBinding binding = new TupleInputBinding(format);
        assertSame(format, binding.getDataFormat());

        TupleOutput out = new TupleOutput();
        out.writeString("abc");
        binding.objectToData(new TupleInput(out), buffer);
        assertEquals(4, buffer.getDataLength());

        Object result = binding.dataToObject(buffer);
        assertTrue(result instanceof TupleInput);
View Full Code Here

TOP

Related Classes of com.sleepycat.bdb.bind.tuple.TupleOutput

Copyright © 2018 www.massapicom. 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.