private void skipRawVarintFastPath() throws IOException { for (int i = 0; i < MAX_VARINT_SIZE; i++) { if (buffer[pos++] >= 0) { return; } } throw InvalidProtocolBufferException.malformedVarint(); }
private void skipRawVarintFastPath() throws IOException { for (int i = 0; i < MAX_VARINT_SIZE; i++) { if (buffer[pos++] >= 0) { return; } } throw InvalidProtocolBufferException.malformedVarint(); }
private void skipRawVarint() throws IOException { for (int i = 0; i < MAX_VARINT_SIZE; i++) { if (readRawByte() >= 0) { return; } } throw InvalidProtocolBufferException.malformedVarint(); }
private void skipRawVarintSlowPath() throws IOException { for (int i = 0; i < MAX_VARINT_SIZE; i++) { if (readRawByte() >= 0) { return; } } throw InvalidProtocolBufferException.malformedVarint(); }
private void skipRawVarintFastPath() throws IOException { for (int i = 0; i < MAX_VARINT_SIZE; i++) { if (UnsafeUtil.getByte(pos++) >= 0) { return; } } throw InvalidProtocolBufferException.malformedVarint(); }
@Override long readRawVarint64SlowPath() throws IOException { long result = 0; for (int shift = 0; shift < 64; shift += 7) { final byte b = readRawByte(); result |= (long) (b & 0x7F) << shift; if ((b & 0x80) == 0) { return result; } } throw InvalidProtocolBufferException.malformedVarint(); }
private void skipRawVarintSlowPath() throws IOException { for (int i = 0; i < MAX_VARINT_SIZE; i++) { if (readRawByte() >= 0) { return; } } throw InvalidProtocolBufferException.malformedVarint(); }
@Override long readRawVarint64SlowPath() throws IOException { long result = 0; for (int shift = 0; shift < 64; shift += 7) { final byte b = readRawByte(); result |= (long) (b & 0x7F) << shift; if ((b & 0x80) == 0) { return result; } } throw InvalidProtocolBufferException.malformedVarint(); }
@Override long readRawVarint64SlowPath() throws IOException { long result = 0; for (int shift = 0; shift < 64; shift += 7) { final byte b = readRawByte(); result |= (long) (b & 0x7F) << shift; if ((b & 0x80) == 0) { return result; } } throw InvalidProtocolBufferException.malformedVarint(); }
private void skipRawVarintSlowPath() throws IOException { for (int i = 0; i < MAX_VARINT_SIZE; i++) { if (readRawByte() >= 0) { return; } } throw InvalidProtocolBufferException.malformedVarint(); }
@Override long readRawVarint64SlowPath() throws IOException { long result = 0; for (int shift = 0; shift < 64; shift += 7) { final byte b = readRawByte(); result |= (long) (b & 0x7F) << shift; if ((b & 0x80) == 0) { return result; } } throw InvalidProtocolBufferException.malformedVarint(); }
/** Read a raw Varint from the stream. */ public long readRawVarint64() throws IOException { int shift = 0; long result = 0; while (shift < 64) { final byte b = readRawByte(); result |= (long)(b & 0x7F) << shift; if ((b & 0x80) == 0) { return result; } shift += 7; } throw InvalidProtocolBufferException.malformedVarint(); }
throw InvalidProtocolBufferException.malformedVarint();
throw InvalidProtocolBufferException.malformedVarint();
throw InvalidProtocolBufferException.malformedVarint();
private void skipRawVarintSlowPath() throws IOException { for (int i = 0; i < 10; i++) { if (readRawByte() >= 0) { return; } } throw InvalidProtocolBufferException.malformedVarint(); }
private void skipRawVarintSlowPath() throws IOException { for (int i = 0; i < 10; i++) { if (readRawByte() >= 0) { return; } } throw InvalidProtocolBufferException.malformedVarint(); }
private void skipRawVarintSlowPath() throws IOException { for (int i = 0; i < 10; i++) { if (readRawByte() >= 0) { return; } } throw InvalidProtocolBufferException.malformedVarint(); }
/** Variant of readRawVarint64 for when uncomfortably close to the limit. */ /* Visible for testing */ long readRawVarint64SlowPath() throws IOException { long result = 0; for (int shift = 0; shift < 64; shift += 7) { final byte b = readRawByte(); result |= (long) (b & 0x7F) << shift; if ((b & 0x80) == 0) { return result; } } throw InvalidProtocolBufferException.malformedVarint(); }
/** Variant of readRawVarint64 for when uncomfortably close to the limit. */ /* Visible for testing */ long readRawVarint64SlowPath() throws IOException { long result = 0; for (int shift = 0; shift < 64; shift += 7) { final byte b = readRawByte(); result |= (long) (b & 0x7F) << shift; if ((b & 0x80) == 0) { return result; } } throw InvalidProtocolBufferException.malformedVarint(); }