Provides an abstraction for read int values, so that decoding logic can be reused in different DataInput.