I'm given a filename and I have to be able to read it from disk and send its contents over a network. I need to be able to determine whether the file is text or binary so I know whether to use a StreamReader or BinaryReader. Another reason why I need to know the content type is because if it is binary, I have to MIME encode the data before sending it over the wire. I'd also like to be able to tell the consumer what the content type is (including the encoding if it is text).
Thanks!