@Override public void writeInt(int v) { activePosition = write32(byteBuffer, byteMask, activePosition, v); }
@Override public void writeInt(int v) { activePosition = write32(byteBuffer, byteMask, activePosition, v); }
@Override public void writeInt(int v) { activePosition = write32(byteBuffer, byteMask, activePosition, v); }
@Override public void writeFloat(float v) { activePosition = write32(byteBuffer, byteMask, activePosition, Float.floatToIntBits(v)); }
@Override public void writeFloat(float v) { activePosition = write32(byteBuffer, byteMask, activePosition, Float.floatToIntBits(v)); }
@Override public void writeFloat(float v) { activePosition = write32(byteBuffer, byteMask, activePosition, Float.floatToIntBits(v)); }
private int writeFloatArray(float[] floats, int len, byte[] bufLocal, int mask, int pos) { pos = writePackedInt(bufLocal, mask, pos, len); for(int i=0;i<len;i++) { pos = write32(bufLocal, mask, pos, Float.floatToIntBits(floats[i])); } return pos; }
private int writeIntArray(int[] ints, int len, byte[] bufLocal, int mask, int pos) { pos = writePackedInt(bufLocal, mask, pos, len); for(int i=0;i<len;i++) { pos = write32(bufLocal, mask, pos, ints[i]); } return pos; }
private int writeIntArray(int[] ints, int len, byte[] bufLocal, int mask, int pos) { pos = writePackedInt(bufLocal, mask, pos, len); for(int i=0;i<len;i++) { pos = write32(bufLocal, mask, pos, ints[i]); } return pos; }
private int writeIntArray(int[] ints, int len, byte[] bufLocal, int mask, int pos) { pos = writePackedInt(bufLocal, mask, pos, len); for(int i=0;i<len;i++) { pos = write32(bufLocal, mask, pos, ints[i]); } return pos; }
private int writeFloatArray(float[] floats, int len, byte[] bufLocal, int mask, int pos) { pos = writePackedInt(bufLocal, mask, pos, len); for(int i=0;i<len;i++) { pos = write32(bufLocal, mask, pos, Float.floatToIntBits(floats[i])); } return pos; }
private int writeFloatArray(float[] floats, int len, byte[] bufLocal, int mask, int pos) { pos = writePackedInt(bufLocal, mask, pos, len); for(int i=0;i<len;i++) { pos = write32(bufLocal, mask, pos, Float.floatToIntBits(floats[i])); } return pos; }
public static <T extends MessageSchema<T>> void setStructType(DataOutputBlobWriter<T> writer, int value) { write32(writer.byteBuffer, writer.byteMask, writer.startPosition+Pipe.blobIndexBasePosition(writer.backingPipe), value); }
public static <T extends MessageSchema<T>> void setStructType(DataOutputBlobWriter<T> writer, int value) { write32(writer.byteBuffer, writer.byteMask, writer.startPosition+Pipe.blobIndexBasePosition(writer.backingPipe), value); }
public static <T extends MessageSchema<T>> boolean structTypeValidation(DataOutputBlobWriter<T> writer, int value) { int old = getStructType(writer); if (value!=old) { if (old<=0) { writer.structuredWithIndexData = true; int base2 = writer.startPosition+Pipe.blobIndexBasePosition(writer.backingPipe); write32(writer.byteBuffer, writer.byteMask, base2, value); } else { throw new UnsupportedOperationException("Type mismatch found "+old+" expected "+value); } } return true; }
public static <T extends MessageSchema<T>> boolean structTypeValidation(DataOutputBlobWriter<T> writer, int value) { int old = getStructType(writer); if (value!=old) { if (old<=0) { writer.structuredWithIndexData = true; int base2 = writer.startPosition+Pipe.blobIndexBasePosition(writer.backingPipe); write32(writer.byteBuffer, writer.byteMask, base2, value); } else { throw new UnsupportedOperationException("Type mismatch found "+old+" expected "+value); } } return true; }
public static <T extends MessageSchema<T>> boolean structTypeValidation(DataOutputBlobWriter<T> writer, int value) { int old = getStructType(writer); if (value!=old) { if (old<=0) { writer.structuredWithIndexData = true; int base2 = writer.startPosition+Pipe.blobIndexBasePosition(writer.backingPipe); write32(writer.byteBuffer, writer.byteMask, base2, value); } else { throw new UnsupportedOperationException("Type mismatch found "+old+" expected "+value); } } return true; }
public static <T extends MessageSchema<T>> void setIntBackData(DataOutputBlobWriter<T> writer, int value, int pos) { assert(value<=writer.position()) : "wrote "+value+" but all the data is only "+writer.position(); assert(pos>=0) : "Can not write beyond the end. Index values must be zero or positive"; write32(writer.byteBuffer, writer.byteMask, computeBackDataPos(writer, pos), value); }
public static <T extends MessageSchema<T>> void setIntBackData(DataOutputBlobWriter<T> writer, int value, int pos) { assert(value<=writer.position()) : "wrote "+value+" but all the data is only "+writer.position(); assert(pos>=0) : "Can not write beyond the end. Index values must be zero or positive"; write32(writer.byteBuffer, writer.byteMask, writer.startPosition+Pipe.blobIndexBasePosition(writer.backingPipe)-(4*(pos+1)), value); }
public static <T extends MessageSchema<T>> void setIntBackData(DataOutputBlobWriter<T> writer, int value, int pos) { assert(value<=writer.position()) : "wrote "+value+" but all the data is only "+writer.position(); assert(pos>=0) : "Can not write beyond the end. Index values must be zero or positive"; write32(writer.byteBuffer, writer.byteMask, computeBackDataPos(writer, pos), value); }