Fix potential bug due to unnecessary cast from long to int in FSDataInputStreamWrapper