writemime methods for contexts.