private int continueRemainingContent(byte[] targetData, int targetOffset, int targetLength) { //only part of the block can be sent so save some for later copyData(targetData, targetOffset, targetLength, byteBackingArray(remainingSourceMeta, pipe), remainingSourceOffset); //do not release read lock we are not done yet remainingSourceLength = remainingSourceLength-targetLength; remainingSourceOffset = remainingSourceOffset+targetLength; return targetLength; }
private int continueRemainingContent(byte[] targetData, int targetOffset, int targetLength) { //only part of the block can be sent so save some for later copyData(targetData, targetOffset, targetLength, byteBackingArray(remainingSourceMeta, pipe), remainingSourceOffset); //do not release read lock we are not done yet remainingSourceLength = remainingSourceLength-targetLength; remainingSourceOffset = remainingSourceOffset+targetLength; return targetLength; }
private int continueRemainingContent(byte[] targetData, int targetOffset, int targetLength) { //only part of the block can be sent so save some for later copyData(targetData, targetOffset, targetLength, byteBackingArray(remainingSourceMeta, pipe), remainingSourceOffset); //do not release read lock we are not done yet remainingSourceLength = remainingSourceLength-targetLength; remainingSourceOffset = remainingSourceOffset+targetLength; return targetLength; }
private int endRemainingContent(byte[] targetData, int targetOffset) { //the entire remaining part of the block can be sent int len = remainingSourceLength; copyData(targetData, targetOffset, len, byteBackingArray(remainingSourceMeta, pipe), remainingSourceOffset); Pipe.confirmLowLevelRead(pipe, recordSize); Pipe.releaseReadLock(pipe); remainingSourceLength = -1; //clear because we are now done with the remaining content return len; }
private int endRemainingContent(byte[] targetData, int targetOffset) { //the entire remaining part of the block can be sent int len = remainingSourceLength; copyData(targetData, targetOffset, len, byteBackingArray(remainingSourceMeta, pipe), remainingSourceOffset); Pipe.confirmLowLevelRead(pipe, recordSize); Pipe.releaseReadLock(pipe); remainingSourceLength = -1; //clear because we are now done with the remaining content return len; }
public int peekLowLevelAPIField(int offset) { int meta = Pipe.peekInt(this.pipe, offset); this.length = Math.max(0, Pipe.peekInt(this.pipe, offset+1)); this.bytesLowBound = this.position = Pipe.convertToPosition(meta, this.pipe); 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 int endRemainingContent(byte[] targetData, int targetOffset) { //the entire remaining part of the block can be sent int len = remainingSourceLength; copyData(targetData, targetOffset, len, byteBackingArray(remainingSourceMeta, pipe), remainingSourceOffset); Pipe.confirmLowLevelRead(pipe, recordSize); Pipe.releaseReadLock(pipe); remainingSourceLength = -1; //clear because we are now done with the remaining content return len; }
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 peekLowLevelAPIField(int offset) { int meta = Pipe.peekInt(this.pipe, offset); this.isStructured = (0!=(Pipe.STRUCTURED_POS_MASK&meta)); this.length = Math.max(0, Pipe.peekInt(this.pipe, offset+1)); this.bytesLowBound = this.position = Pipe.convertToPosition(meta, this.pipe); 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; }
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)); }
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); }