This is an improvement. It would be further improved by using "position + STRING_LEN_SIZE" in place of the magic "position + 4".
It would also be helpful to go a step further and throw a similar RuntimeException if the "len" read in the next line exceeds the remaining buffer length -- rather than take our chances on OutOfMemory for huge corrupt values or OutOfRange for moderate-sized corrupt values.

Also, getVarbinary -- the other variable length type -- should get similar treatment.