You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 24, 2020. It is now read-only.
At this time, the ITextScanner interface does not provide APIs for binary data.
The workarounds are:
Use OctetLexer to read any number of bytes as instances of Element
Read directly from the underlying stream
The first workaround is nasty for a number of reasons:
Overhead: the OctetLexer class creates an instance of the Element class for every byte.
Conversion: the OctetLexer class converts each byte to System.String; you have to convert it back to a byte using ITextScanner.Encoding.
The second workaround isn't much better:
You already have to have a reference to the underlying stream to make it work
Reading from the stream does not update the scanner position
Suggested fix: copy the Read and ReadByte + async variants from System.IO.Stream to the ITextScanner interface. Implement these methods in a way that updates the scanner's internal state.