Ok it turns out this 3rd party component I am working with stores an email attachment in a property of string type (it is already decoded).
How would I store this to file now?
It has: filename, encodingtype and the string representation of the file.