public TextElement ReadMaximumData()
{
// Set file access to reading
CurrentAccess = FileAccess.Read;
if (!CanRead) return TextElement.Null;
TextElement data;
//
if ((readBuffers == null) || (readBuffers.Count == 0))
{
// Read one block without storing it in the buffers.
data = ReadFiltered(readChunkSize);
int filteredLength = data.Length;
readFilteredCount += filteredLength;
}
else
{
// Dequeue one whole buffer.
data = readBuffers.Peek();
DropReadBuffer();
}
//
return data;
}