Package com.tangosol.util

Examples of com.tangosol.util.Binary


        ConfigurablePofContext ctx = new ConfigurablePofContext(XmlHelper.loadXml(getClass().getResource("/test-pof-config.xml")));
       
        TypeB b = new TypeB();
        b.stringArray = null;
       
        Binary blob = ExternalizableHelper.toBinary(b, ctx);
       
        ReflectionPofExtractor extracter = new ReflectionPofExtractor("stringArray");
       
        Assert.assertEquals(null, extracter.extractFromBinary(ctx, blob));       
    }
View Full Code Here


       
        int[] array = {1, 2, 3};
        TypeB b = new TypeB();
        b.intArray = array;
       
        Binary blob = ExternalizableHelper.toBinary(b, ctx);
       
        ReflectionPofExtractor extracter;
        extracter = new ReflectionPofExtractor("intArray");       
        Assert.assertArrayEquals(array, (int[])extracter.extractFromBinary(ctx, blob));       
View Full Code Here

        ConfigurablePofContext ctx = new ConfigurablePofContext(XmlHelper.loadXml(getClass().getResource("/test-pof-config.xml")));
       
        TypeB b = new TypeB();
        b.intArray = null;
       
        Binary blob = ExternalizableHelper.toBinary(b, ctx);
       
        ReflectionPofExtractor extracter = new ReflectionPofExtractor("intArray");
       
        Assert.assertEquals(null, extracter.extractFromBinary(ctx, blob));       
    }
View Full Code Here

        b.string = "ABC";
        TypeC c = new TypeC();
        c.b = b;
        c.barray = new TypeB[]{b, b};
       
        Binary blob = ExternalizableHelper.toBinary(c, ctx);
       
        ReflectionPofExtractor extracter;
        extracter = new ReflectionPofExtractor("b.string");
        Assert.assertEquals("ABC", extracter.extractFromBinary(ctx, blob));       
        extracter = new ReflectionPofExtractor("barray.length");
View Full Code Here

        b.string = "ABC";
        TypeC c = new TypeC();
        c.b = b;
        c.barray = new TypeB[]{b, b};
       
        Binary blob = ExternalizableHelper.toBinary(c, ctx);
       
        ReflectionPofExtractor extracter;
        extracter = new ReflectionPofExtractor("b.string.count");       
        Assert.assertEquals(3, extracter.extractFromBinary(ctx, blob));       
    }
View Full Code Here

        b.string = null;
        TypeC c = new TypeC();
        c.b = b;
        c.barray = new TypeB[]{b, b};

        Binary blob = ExternalizableHelper.toBinary(c, ctx);
       
        ReflectionPofExtractor extracter;
        extracter = new ReflectionPofExtractor("b.string");       
        Assert.assertEquals(null, extracter.extractFromBinary(ctx, blob));       
    }
View Full Code Here

        b.tu = TimeUnit.MILLISECONDS;
        TypeC c = new TypeC();
        c.b = b;
        c.barray = new TypeB[]{b, b};

        Binary blob = ExternalizableHelper.toBinary(c, ctx);
       
        ReflectionPofExtractor extracter;
       
        extracter = new ReflectionPofExtractor("b.tu");       
        Assert.assertEquals(TimeUnit.MILLISECONDS, extracter.extractFromBinary(ctx, blob));       
View Full Code Here

        b.tu = null;
        TypeC c = new TypeC();
        c.b = b;
        c.barray = new TypeB[]{b, b};
       
        Binary blob = ExternalizableHelper.toBinary(c, ctx);
       
        ReflectionPofExtractor extracter;
       
        extracter = new ReflectionPofExtractor("b.tu");       
        Assert.assertEquals(null, extracter.extractFromBinary(ctx, blob));       
View Full Code Here

        b.stringArray = new String[]{"A","B","C"};
        TypeC c = new TypeC();
        c.b = b;
        c.barray = new TypeB[]{b, b};

        Binary blob = ExternalizableHelper.toBinary(c, ctx);
       
        ReflectionPofExtractor extracter;
        extracter = new ReflectionPofExtractor("b.stringArray");       
        Assert.assertArrayEquals(new String[]{"A","B","C"}, (String[])extracter.extractFromBinary(ctx, blob));       
   
View Full Code Here

        b.stringArray = null;
        TypeC c = new TypeC();
        c.b = b;
        c.barray = new TypeB[]{b, b};

        Binary blob = ExternalizableHelper.toBinary(c, ctx);
       
        ReflectionPofExtractor extracter;
       
        extracter = new ReflectionPofExtractor("b.stringArray");       
        Assert.assertEquals(null, extracter.extractFromBinary(ctx, blob));       
View Full Code Here

TOP

Related Classes of com.tangosol.util.Binary

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.