Package org.lilyproject.bytes.impl

Examples of org.lilyproject.bytes.impl.DataOutputImpl.writeInt()


        double d = random.nextDouble();
        dataOutput.writeDouble(d);
        float f = random.nextFloat();
        dataOutput.writeFloat(f);
        int i = random.nextInt();
        dataOutput.writeInt(i);
        long l = random.nextLong();
        dataOutput.writeLong(l);
        short s = (short) 4;
        dataOutput.writeShort(s);
        String string = randomUnicodeString();
View Full Code Here


     */
    byte[] serializeDependenciesForward(Collection<DependencyEntry> dependencies) throws IOException {
        final DataOutputImpl dataOutput = new DataOutputImpl();

        // total number of dependencies
        dataOutput.writeInt(dependencies.size());

        for (DependencyEntry dependencyEntry : dependencies) {
            // we store the master record id, because that is how they are stored in the backward table
            final byte[] masterTableBytes = Bytes.toBytes(dependencyEntry.getDependency().getTable());
            final byte[] masterBytes = dependencyEntry.getDependency().getRecordId().getMaster().toBytes();
View Full Code Here

        for (DependencyEntry dependencyEntry : dependencies) {
            // we store the master record id, because that is how they are stored in the backward table
            final byte[] masterTableBytes = Bytes.toBytes(dependencyEntry.getDependency().getTable());
            final byte[] masterBytes = dependencyEntry.getDependency().getRecordId().getMaster().toBytes();
            dataOutput.writeInt(masterTableBytes.length);
            dataOutput.writeBytes(masterTableBytes);
            dataOutput.writeInt(masterBytes.length);
            dataOutput.writeBytes(masterBytes);

            final byte[] variantPropertiesBytes = serializeVariantPropertiesPattern(createVariantPropertiesPattern(
View Full Code Here

            // we store the master record id, because that is how they are stored in the backward table
            final byte[] masterTableBytes = Bytes.toBytes(dependencyEntry.getDependency().getTable());
            final byte[] masterBytes = dependencyEntry.getDependency().getRecordId().getMaster().toBytes();
            dataOutput.writeInt(masterTableBytes.length);
            dataOutput.writeBytes(masterTableBytes);
            dataOutput.writeInt(masterBytes.length);
            dataOutput.writeBytes(masterBytes);

            final byte[] variantPropertiesBytes = serializeVariantPropertiesPattern(createVariantPropertiesPattern(
                    dependencyEntry.getDependency().getRecordId().getVariantProperties(),
                    dependencyEntry.getMoreDimensionedVariants()));
View Full Code Here

    byte[] serializeVariantPropertiesPattern(DerefMapVariantPropertiesPattern variantPropertiesPattern)
            throws IOException {
        final DataOutput dataOutput = new DataOutputImpl();

        // total number of entries
        dataOutput.writeInt(variantPropertiesPattern.pattern.size());

        for (Map.Entry<String, String> patternEntry : variantPropertiesPattern.pattern.entrySet()) {
            // name
            final String name = patternEntry.getKey();
            dataOutput.writeUTF(name);
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.