R
Roedy Green
final InputStreamReader eisr = new InputStreamReader( bis,
( charset != null ? charset : Charset.defaultCharset() ) );
Sometimes a null Charset is treated as equivalent to the default
Charset and the code above would not be necessary. InputStreamReader
does not document if it can handle a null.
Is there some official overall policy on this?
In a related issue, it would make life easier if Charset.forName(
"default" ) gave you the platform default and you could treat it just
like any other encoding rather that having methods with and without an
Charset parameter.
( charset != null ? charset : Charset.defaultCharset() ) );
Sometimes a null Charset is treated as equivalent to the default
Charset and the code above would not be necessary. InputStreamReader
does not document if it can handle a null.
Is there some official overall policy on this?
In a related issue, it would make life easier if Charset.forName(
"default" ) gave you the platform default and you could treat it just
like any other encoding rather that having methods with and without an
Charset parameter.