private static int openLowLevelAPIField(LittleEndianDataInputBlobReader that) { int meta = Pipe.takeByteArrayMetaData((Pipe<?>) that.pipe); that.length = Pipe.takeByteArrayLength((Pipe<?>) that.pipe); that.position = Pipe.bytePosition(meta, that.pipe, that.length); that.backing = Pipe.byteBackingArray(meta, that.pipe); that.bytesLimit = that.pipe.blobMask & (that.position + that.length); return that.length; }
public int openLowLevelAPIField() { int meta = Pipe.takeByteArrayMetaData(this.pipe); this.isStructured = (0!=(Pipe.STRUCTURED_POS_MASK&meta)); this.length = Math.max(0, Pipe.takeByteArrayLength(this.pipe)); this.bytesLowBound = this.position = Pipe.bytePosition(meta, this.pipe, this.length); this.backing = Pipe.byteBackingArray(meta, this.pipe); assert(this.backing!=null) : "The pipe "+(1==(meta>>31)?" constant array ": " blob ")+"must be defined before use.\n "+this.pipe; this.bytesHighBound = this.pipe.blobMask & (this.position + this.length); assert(Pipe.validatePipeBlobHasDataToRead(this.pipe, this.position, this.length)); return this.length; }
public int openLowLevelAPIField() { int meta = Pipe.takeByteArrayMetaData(this.pipe); this.isStructured = (0!=(Pipe.STRUCTURED_POS_MASK&meta)); this.length = Math.max(0, Pipe.takeByteArrayLength(this.pipe)); assert(this.length<=this.pipe.sizeOfBlobRing) : "bad length "+this.length; this.bytesLowBound = this.position = Pipe.bytePosition(meta, this.pipe, this.length); this.backing = Pipe.byteBackingArray(meta, this.pipe); assert(this.backing!=null) : "The pipe "+(1==(meta>>31)?" constant array ": " blob ")+"must be defined before use.\n "+this.pipe; this.bytesHighBound = this.pipe.blobMask & (this.position + this.length); assert(Pipe.validatePipeBlobHasDataToRead(this.pipe, this.position, this.length)); return this.length; }
private static int openLowLevelAPIField(LittleEndianDataInputBlobReader that) { int meta = Pipe.takeByteArrayMetaData((Pipe<?>) that.pipe); that.length = Pipe.takeByteArrayLength((Pipe<?>) that.pipe); that.position = Pipe.bytePosition(meta, that.pipe, that.length); that.backing = Pipe.byteBackingArray(meta, that.pipe); that.bytesLimit = that.pipe.blobMask & (that.position + that.length); return that.length; }
private static int openLowLevelAPIField(LittleEndianDataInputBlobReader that) { int meta = Pipe.takeByteArrayMetaData((Pipe<?>) that.pipe); that.length = Pipe.takeByteArrayLength((Pipe<?>) that.pipe); that.position = Pipe.bytePosition(meta, that.pipe, that.length); that.backing = Pipe.byteBackingArray(meta, that.pipe); that.bytesLimit = that.pipe.blobMask & (that.position + that.length); return that.length; }
private void setValue(Pipe p, int meta, int length, long value) { setValue(0, Pipe.byteBackingArray(meta, p), Pipe.bytePosition(meta, p, length), length, Pipe.blobMask(p), value); }
private void setValue(Pipe p, int meta, int length, long value) { setValue(0, Pipe.byteBackingArray(meta, p), Pipe.bytePosition(meta, p, length), length, Pipe.blobMask(p), value); }
public static long query(TrieParserReader trieReader, TrieParser trie, Pipe<?> input, final long unfoundResult) { int meta = Pipe.takeByteArrayMetaData(input); int length = Pipe.takeByteArrayLength(input); return query(trieReader, trie, Pipe.byteBackingArray(meta, input), Pipe.bytePosition(meta, input, length), length, Pipe.blobMask(input), unfoundResult ); }
public static void parseSetup(TrieParserReader trieReader, Pipe<?> input) { //TODO: cofirm this field is next... int meta = Pipe.takeByteArrayMetaData(input); int length = Pipe.takeByteArrayLength(input); parseSetup(trieReader, Pipe.byteBackingArray(meta, input), Pipe.bytePosition(meta, input, length), length, Pipe.blobMask(input)); }
public static long query(TrieParserReader trieReader, TrieParser trie, Pipe<?> input, final long unfoundResult) { int meta = Pipe.takeByteArrayMetaData(input); int length = Pipe.takeByteArrayLength(input); return query(trieReader, trie, Pipe.byteBackingArray(meta, input), Pipe.bytePosition(meta, input, length), length, Pipe.blobMask(input), unfoundResult ); }
public static void parseSetup(TrieParserReader trieReader, Pipe<?> input) { //TODO: cofirm this field is next... int meta = Pipe.takeByteArrayMetaData(input); int length = Pipe.takeByteArrayLength(input); parseSetup(trieReader, Pipe.byteBackingArray(meta, input), Pipe.bytePosition(meta, input, length), length, Pipe.blobMask(input)); }
public static void parseSetup(TrieParserReader trieReader, Pipe<?> input) { //TODO: cofirm this field is next... int meta = Pipe.takeByteArrayMetaData(input); int length = Pipe.takeByteArrayLength(input); parseSetup(trieReader, Pipe.byteBackingArray(meta, input), Pipe.bytePosition(meta, input, length), length, Pipe.blobMask(input)); }
public static long query(TrieParserReader trieReader, TrieParser trie, Pipe<?> input, final long unfoundResult) { int meta = Pipe.takeByteArrayMetaData(input); int length = Pipe.takeByteArrayLength(input); return query(trieReader, trie, Pipe.byteBackingArray(meta, input), Pipe.bytePosition(meta, input, length), length, Pipe.blobMask(input), unfoundResult ); }
/** * Read this var len field and write its contents to the target OutputStream * @param pipe to read from * @param out OutputStream to write data to * @throws IOException */ public static <S extends MessageSchema<S>> void writeFieldToOutputStream(Pipe<S> pipe, OutputStream out) throws IOException { int meta = Pipe.takeByteArrayMetaData(pipe); int length = Pipe.takeByteArrayLength(pipe); if (length>0) { int off = bytePosition(meta,pipe,length) & Pipe.blobMask(pipe); copyFieldToOutputStream(out, length, Pipe.byteBackingArray(meta, pipe), off, pipe.sizeOfBlobRing-off); } }
private void extractBytes() { Pipe.takeMsgIdx(pipe); int meta = Pipe.takeByteArrayMetaData(pipe); length = Pipe.takeByteArrayLength(pipe); backing = Pipe.byteBackingArray(meta, pipe); mask = Pipe.blobMask(pipe); position = Pipe.bytePosition(meta, pipe, length); Pipe.confirmLowLevelWrite(pipe); Pipe.publishWrites(pipe); }
private void extractBytes() { Pipe.takeMsgIdx(pipe); int meta = Pipe.takeByteArrayMetaData(pipe); length = Pipe.takeByteArrayLength(pipe); backing = Pipe.byteBackingArray(meta, pipe); mask = Pipe.blobMask(pipe); position = Pipe.bytePosition(meta, pipe, length); Pipe.confirmLowLevelWrite(pipe); Pipe.publishWrites(pipe); }
private void extractBytes() { Pipe.takeMsgIdx(pipe); int meta = Pipe.takeByteArrayMetaData(pipe); length = Pipe.takeByteArrayLength(pipe); backing = Pipe.byteBackingArray(meta, pipe); mask = Pipe.blobMask(pipe); position = Pipe.bytePosition(meta, pipe, length); Pipe.confirmLowLevelWrite(pipe); Pipe.publishWrites(pipe); }
private void extractBytes() { Pipe.takeMsgIdx(pipe); int meta = Pipe.takeByteArrayMetaData(pipe); length = Pipe.takeByteArrayLength(pipe); backing = Pipe.byteBackingArray(meta, pipe); mask = Pipe.blobMask(pipe); position = Pipe.bytePosition(meta, pipe, length); Pipe.confirmLowLevelWrite(pipe); Pipe.publishWrites(pipe); }
private void extractBytes() { Pipe.takeMsgIdx(pipe); int meta = Pipe.takeByteArrayMetaData(pipe); length = Pipe.takeByteArrayLength(pipe); backing = Pipe.byteBackingArray(meta, pipe); mask = Pipe.blobMask(pipe); position = Pipe.bytePosition(meta, pipe, length); Pipe.confirmLowLevelWrite(pipe); Pipe.publishWrites(pipe); }
private void extractBytes() { Pipe.takeMsgIdx(pipe); int meta = Pipe.takeByteArrayMetaData(pipe); length = Pipe.takeByteArrayLength(pipe); backing = Pipe.byteBackingArray(meta, pipe); mask = Pipe.blobMask(pipe); position = Pipe.bytePosition(meta, pipe, length); Pipe.confirmLowLevelWrite(pipe); Pipe.publishWrites(pipe); }