Added STF reading

I haven't tested it but it should work - I converted this from my C#
implementation which I have tested and works