In the article it states that he started swimming to shore only after the ship had run aground a few hundred meters from the shore. So the question remains, how did he sustain himself beforehand? Did the ship have years worth of supplies for him on board?
I was wondering the same thing, since the ship had no power either perishables would go bad quickly, also where did he get money to buy food later on? Was it his savings?
The article names 2019 as when he totally ran out of fuel. I assume there were previously enough rations on board (it was stocked for an entire crew before being abandoned), and perhaps he made a deal with the visiting guard to bring food.