Read the data repeatedly when the buffer size is smaller than the data size