code: static int readRawVarint32(final InputStream input) throws IOException {
      final int firstByte = input.read();
      if (firstByte == -1) {
        throw InvalidProtocolBufferException.truncatedMessage();
      }
      return readRawVarint32(firstByte, input);
    }
docs: Reads a varint from the input one byte at a time, so that it does not
  read any bytes after the end of the varint.  If you simply wrapped the
  stream in a CodedInputStream and used {@link #readRawVarint32(InputStream)}
  then you would probably end up reading past the end of the varint since
  CodedInputStream buffers its input.