Package org.lilyproject.bytes.api

Examples of org.lilyproject.bytes.api.DataInput.readVInt()


        Assert.assertEquals(f, dataInput.readFloat(), 0.0001);
        Assert.assertEquals(i, dataInput.readInt());
        Assert.assertEquals(l, dataInput.readLong());
        Assert.assertEquals(s, dataInput.readShort());
        Assert.assertEquals(string, dataInput.readUTF());
        Assert.assertEquals(Math.abs(i), dataInput.readVInt());
        Assert.assertEquals(Math.abs(l), dataInput.readVLong());
    }

    public void testIndexOf() {
        byte[] source = {0x09, 0x08, 0x07, 0x06, 0x00, 0x05, 0x04, 0x03, 0x02, 0x01};
View Full Code Here


    public static Set<String> deserialize(byte[] stringsAsBytes) {
        Set<String> permissions = new HashSet<String>();

        DataInput input = new DataInputImpl(stringsAsBytes);
        int permCount = input.readVInt();
        for (int i = 0; i < permCount; i++) {
            permissions.add(input.readVUTF());
        }

        return permissions;
View Full Code Here

        String name = input.readVUTF();
        String tenant = input.readVUTF();

        Set<String> roles = new HashSet<String>();
        int roleCnt = input.readVInt();
        for (int i = 0; i < roleCnt; i++) {
            roles.add(input.readVUTF());
        }

        return new AuthorizationContext(name, tenant, roles);
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.