for this cases a possible solution could be
%Stream.Global has a FindAt method that could give you a position of "\u00"
[Find the first occurrence of target in the stream starting the search at position. ]
http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?…
But: if you are on the decoded stream all non printables are just single characters. No issue to cut it in pieces
- read your source stream in reasonable sized junks
- clean out what ever you need
- append it to a temporary stream
- loop on source until you hit AtEnd condition
- finally replace your source either by "copyFromSteam" method [temp -> source]
or replace source stream reference by temp stream reference
I guess the whole code is shorter than this description.
I'd suggest not to touch the global under the source steam.
- Log in to post comments