On Jul 29, 2013 7:53 PM, "Takeshi Yoshino" <[email protected]> wrote: > > On Tue, Jul 30, 2013 at 5:16 AM, Jonas Sicking <[email protected]> wrote: >> >> Couldn't we simply let the Stream class have a content type, which > > > That's what I meant. In Feras's proposal Stream has type attribute. I copied it to my draft. read(As)Text would use it.
Sounds good to me. >> could contain an encoding. Then when stream.readText is called, if >> there's an explicit encoding, it would use that encoding when > > > Do you think it should also have overrideMimeType like XHR? I think that use case is rare enough that we can solve it by letting the author create a new Stream object, which presumably would allow specifying a type for that stream, and then feed that new stream the contents of the old stream. / Jonas
