Package org.codehaus.preon

Examples of org.codehaus.preon.Codec.decode()


        expect(buffer.getBitPos()).andReturn(12L).anyTimes();
        buffer.setBitPos(16L);
        replay(codec, metadata, buffer, resolver, context);
        Codec decorated = decorator.decorate(codec, metadata, Test1.class, context);
        assertNotSame(decorated, codec);
        decorated.decode(buffer, resolver, builder);
        verify(codec, metadata, buffer, resolver, context);
    }

    public void testAligningField() throws DecodingException {
        ByteAligningDecorator decorator = new ByteAligningDecorator();
View Full Code Here


        expect(metadata.isAnnotationPresent(ByteAlign.class)).andReturn(true);
        buffer.setBitPos(16L);
        replay(codec, metadata, buffer, resolver, context);
        Codec decorated = decorator.decorate(codec, metadata, Test2.class, context);
        assertNotSame(decorated, codec);
        decorated.decode(buffer, resolver, builder);
        verify(codec, metadata, buffer, resolver, context);
    }


    @ByteAlign
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.