off - relative position to set the input position indicator to.
dir - defines base position to apply the relative offset to. It can be one of the following constants:
beg the beginning of a stream
end the ending of a stream
cur the current position of stream position indicator