I load stream into buffer, and consume that with DataReader.
private async Task InitializeDataReader()
{
IBuffer buffer = await FileIO.ReadBufferAsync(_file).AsTask();
_reader = DataReader.FromBuffer(buffer);
_reader.UnicodeEncoding = _encoding;
}
But sometimes I need to seek 1
byte back from current position. this was actually possible for many readers,
_reader.BaseStream.Seek(-1, SeekOrigin.Current);
But it doesn't exist for DataReader
. What is the alternative approach in UWP?
If I shouldn't use DataReader what is the alternative class in Windows.Storage.Streams