Chris Hostetter wrote:
A few questions aboutthis...

: SOLR-214 -- override getReader() explicitly.  subclass called instance
: variables, not getContentType()

1) wouldn't it make sense to make ContentStreamBase use getContentType()
instead of contentType so that it can be subclassed in this case, instead
of duplicating hte getReader in every subclass?


agree.


2) ...

: +      }
: +      public Reader getReader() throws IOException {
: +        String charset = ContentStreamBase.getCharsetFromContentType( 
req.getContentType() );
: +        return charset == null
: +          ? new InputStreamReader( getStream() )
: +          : new InputStreamReader( getStream(), charset );

...do we really want to use the single arg constructure if the request has
no charset, or should we assume UTF-8 ?

I like the suggestion to defaul to 'utf-8' -- this way the behavior is well defined. Otherwise it depends on the platform configuration and how the container may (or may not) deal with charset encodings.


ryan

Reply via email to