/** Read a 64-bit little-endian integer from the stream. */ public long readRawLittleEndian64() throws IOException { byte b1 = readRawByte(); byte b2 = readRawByte(); byte b3 = readRawByte(); byte b4 = readRawByte(); byte b5 = readRawByte(); byte b6 = readRawByte(); byte b7 = readRawByte(); byte b8 = readRawByte(); return (((long) b1 & 0xff)) | (((long) b2 & 0xff) << 8) | (((long) b3 & 0xff) << 16) | (((long) b4 & 0xff) << 24) | (((long) b5 & 0xff) << 32) | (((long) b6 & 0xff) << 40) | (((long) b7 & 0xff) << 48) | (((long) b8 & 0xff) << 56); }
/** Read a 32-bit little-endian integer from the stream. */ public int readRawLittleEndian32() throws IOException { byte b1 = readRawByte(); byte b2 = readRawByte(); byte b3 = readRawByte(); byte b4 = readRawByte(); return (((int) b1 & 0xff)) | (((int) b2 & 0xff) << 8) | (((int) b3 & 0xff) << 16) | (((int) b4 & 0xff) << 24); }
byte tmp = readRawByte(); if (tmp >= 0) { return tmp; if ((tmp = readRawByte()) >= 0) { result |= tmp << 7; } else { result |= (tmp & 0x7f) << 7; if ((tmp = readRawByte()) >= 0) { result |= tmp << 14; } else { result |= (tmp & 0x7f) << 14; if ((tmp = readRawByte()) >= 0) { result |= tmp << 21; } else { result |= (tmp & 0x7f) << 21; result |= (tmp = readRawByte()) << 28; if (tmp < 0) { if (readRawByte() >= 0) return result;
/** Read a raw Varint from the stream. */ public long readRawVarint64() throws IOException { int shift = 0; long result = 0; while (shift < 64) { byte b = readRawByte(); result |= (long) (b & 0x7F) << shift; if ((b & 0x80) == 0) return result; shift += 7; } throw InvalidProtocolBufferException.malformedVarint(); }