Re: Overlap between StreamReader and FileReader

On Jul 29, 2013 7:53 PM, "Takeshi Yoshino" <tyoshino@google.com> wrote:
>
> On Tue, Jul 30, 2013 at 5:16 AM, Jonas Sicking <jonas@sicking.cc> 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

Received on Tuesday, 30 July 2013 03:08:09 UTC