public static <S extends MessageSchema<S>> int readPackedInt(DataInputBlobReader<S> that) { byte v = that.backing[that.byteMask & that.position++]; int accumulator = (~((int)(((v>>6)&1)-1)))&0xFFFFFF80; return (v >= 0) ? readPackedInt((accumulator | v) << 7,that.backing,that.byteMask,that, 0) : accumulator |(v & 0x7F); }
public static <S extends MessageSchema<S>> int readPackedInt(DataInputBlobReader<S> that) { byte v = that.backing[that.byteMask & that.position++]; int accumulator = (~((int)(((v>>6)&1)-1)))&0xFFFFFF80; return (v >= 0) ? readPackedInt((accumulator | v) << 7,that.backing,that.byteMask,that, 0) : accumulator |(v & 0x7F); }
public static <S extends MessageSchema<S>> int readPackedInt(DataInputBlobReader<S> that) { byte v = that.backing[that.byteMask & that.position++]; int accumulator = (~((int)(((v>>6)&1)-1)))&0xFFFFFF80; return (v >= 0) ? readPackedInt((accumulator | v) << 7,that.backing,that.byteMask,that, 0) : accumulator |(v & 0x7F); }
private static <S extends MessageSchema<S>> int readPackedIntB(int a, byte[] buf, int mask, DataInputBlobReader<S> that, byte v, int depth) { assert(depth<7) : "Error malformed data"; return (v >= 0) ? readPackedInt((a | v) << 7, buf, mask, that, depth) : a | (v & 0x7F); }
public static <S extends MessageSchema<S>> void readPackedChars(DataInputBlobReader<S> that, Appendable target) { int length = readPackedInt(that); int i = length; try { while (--i>=0) { target.append((char) readPackedInt(that)); } } catch (IOException e) { throw new RuntimeException(e); } }
public static <S extends MessageSchema<S>> void readPackedChars(DataInputBlobReader<S> that, Appendable target) { int length = readPackedInt(that); int i = length; try { while (--i>=0) { target.append((char) readPackedInt(that)); } } catch (IOException e) { throw new RuntimeException(e); } }
@Override public short readPackedShort() { short result = (short)readPackedInt(this); assert(storeMostRecentPacked(result)); return result; }
@Override public int readPackedInt() { int result = readPackedInt(this); assert(storeMostRecentPacked(result)); return result; }
@Override public short readPackedShort() { short result = (short)readPackedInt(this); assert(storeMostRecentPacked(result)); return result; }
@Override public short readPackedShort() { short result = (short)readPackedInt(this); assert(storeMostRecentPacked(result)); return result; }
private void visitSingleFloat(StructFloatListener visitor, int totalCount, final int[] curPos, final int[] curSize, int c) { float value = Float.intBitsToFloat(channelReader.readPackedInt()); visitor.value(value, Float.isNaN(value), curPos, curSize, c, totalCount); }
@Override public int readPackedInt() { int result = readPackedInt(this); assert(storeMostRecentPacked(result)); return result; }
private void visitSingleFloat(StructFloatListener visitor, int totalCount, final int[] curPos, final int[] curSize, int c) { float value = Float.intBitsToFloat(channelReader.readPackedInt()); visitor.value(value, Float.isNaN(value), curPos, curSize, c, totalCount); }
private void visitSingleFloat(StructFloatListener visitor, int totalCount, final int[] curPos, final int[] curSize, int c) { float value = Float.intBitsToFloat(channelReader.readPackedInt()); visitor.value(value, Float.isNaN(value), curPos, curSize, c, totalCount); }
@Override public int readPackedInt() { int result = readPackedInt(this); assert(storeMostRecentPacked(result)); return result; }
@Override public int readPackedInt() { checkLimit(this,1); return super.readPackedInt(); }
private void visitSingleInt(StructIntListener visitor, int totalCount, final int[] curPos, final int[] curSize, int c) { final int readPackedInt = channelReader.readPackedInt(); boolean isNull = false; if (0==readPackedInt) { isNull = channelReader.wasPackedNull(); } visitor.value(readPackedInt, isNull, curPos, curSize, c, totalCount); }
private void visitSingleInt(StructIntListener visitor, int totalCount, final int[] curPos, final int[] curSize, int c) { final int readPackedInt = channelReader.readPackedInt(); boolean isNull = false; if (0==readPackedInt) { isNull = channelReader.wasPackedNull(); } visitor.value(readPackedInt, isNull, curPos, curSize, c, totalCount); } /**
private void visitSingleInt(StructIntListener visitor, int totalCount, final int[] curPos, final int[] curSize, int c) { final int readPackedInt = channelReader.readPackedInt(); boolean isNull = false; if (0==readPackedInt) { isNull = channelReader.wasPackedNull(); } visitor.value(readPackedInt, isNull, curPos, curSize, c, totalCount); }
private void readHeaderForNextBlock(DataInputBlobReader<RawDataSchema> inputStream) { if (inputStream.available( ) >= (ChannelReader.PACKED_INT_SIZE + ChannelReader.PACKED_LONG_SIZE) || isEndOfFile || isShuttingDown ) { int orig = inputStream.available(); targetPipeIdx = inputStream.readPackedInt(); targetRemaining = inputStream.readPackedLong(); RawDataSchemaUtil.releaseConsumed(source, inputStream, orig); } }