Package org.lilyproject.bytes.impl

Examples of org.lilyproject.bytes.impl.DataOutputImpl


    public static void setExtraPermissions(Set<String> permissions, OperationWithAttributes op) {
        op.setAttribute(EXTRA_PERMISSION_ATT, serialize(permissions));
    }

    public static byte[] serialize(Set<String> strings) {
        DataOutput builder = new DataOutputImpl();
        builder.writeVInt(strings.size());
        for (String permission : strings) {
            builder.writeVUTF(permission);
        }
        return builder.toByteArray();
    }
View Full Code Here


    public Set<String> getRoles() {
        return roles;
    }

    public byte[] serialize() {
        DataOutput buffer = new DataOutputImpl();

        buffer.writeVUTF(name);
        buffer.writeVUTF(tenant);

        buffer.writeVInt(roles.size());
        for (String role : roles) {
            buffer.writeVUTF(role);
        }

        return buffer.toByteArray();
    }
View Full Code Here

TOP

Related Classes of org.lilyproject.bytes.impl.DataOutputImpl

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.