@Override public void writeFloat(float v) { writeInt(Float.floatToIntBits(v)); }
writeVInt(-1); else writeInt(-1); return;
/** * Serializes a list of {@link DependencyEntry}s into a byte array for * usage in the forward index table. It uses a variable length byte array encoding schema. * * @param dependencies list of dependencies to serialize * @return byte array with the serialized format */ 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(); 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())); dataOutput.writeBytes(variantPropertiesBytes); } return dataOutput.toByteArray(); }